Alexey Trofimenko writes: > if we really about to lose C-style comma, would we have something new > instead? > > new C<,>,( as I've been told here by wise ones), doesn't guarantee order > in which its operands will be evaluated, and even doesn't guarantee that > they won't be optimised away before evaluating, if all expression is in > void > context.. right?
Nope, that was just silliness. Although the scalar comma is going away in favor of a list constructor, I presume that there will be no opimizing away of elements, and that they will probably still be evaluated left to right. Optimizations that you get from changing the evaluation order aren't big enough to warrant such a strange semantic effect. BUT: the subexpressions will be evaluated in list context. > I'm thinking about C<then>, analogious to old C<,> (maybe with lower > precedence than C<and> and C<or> have?) > > pray_to $_ then sacrifice <$virgin> for @evil_gods > > hm.. maybe C<then> should make first action in void context (I hate noise > when doing business) That's interesting. I brought up the same thing and proposed the same solution just a few months ago. Same keyword and everything :-) Larry didn't go for it. Note, we already have an operator that puts its left side in void context and evaluates it before its right one: we call it C<;>. do { pray_to $_; sacrifice <$virgin> } for @evil_gods; Luke