"Oh, it's got lots of Japanese in it, I'd better read it..." :) [EMAIL PROTECTED] (Larry Wall) writes: > Some will argue that since English doesn't have a grammatical > postfix topicalizer like Japanese, we should stick with something > like more English-like: > > $x = (.a + .b + .c given $foo)
I think I'm missing something here. We have "given" as a perfectly good topicaliser. Now, I remember harping on a while ago about generalizing the idea of some control structures returning values, such as $x = if $a { $b } else { $c }; Now if we do generalise that, we get $x = given $foo { .a + .b + .c }; which gives us the topic-in-front form, the "given" which is the standard way of declaring the topic, and it's all nice. > my Dog $dog wa= .new; Urgh. This reads like you're topicalising a $dog, assigning to it and acting on it all at the same time. Too many particles! my Dog $inu wa ga o new desu; # ? :) > So you could usefully say something like > > $modthingie wa %= .modulus; Hrm. given($modthingie) %= .modulus; might work, but it relies on a few pieces of underlying magic, none of which I believe to be over-the-top in themselves but taken together may leave a bad taste: control structures return a value, as above given takes an optional block, purely setting the topic if no block the topic persists throughout a statement > if operator it is. I don't think it's an operator so much as a function. It sets the topic and, depending on how things turn out, returns either void or the topic again. -- teco < /dev/audio - Ignatios Souvatzis