in reply to Re: order in map
in thread order in map

Eh, I don't think the <== will help. It's too far away. The problem is that when encountering the {, perl has to decide whether what's following is a block or a hashref. And to decide that, it can only look a limited amount of tokens ahead. (2 tokens, I think). So, when it sees the { followed by a string, followed by a comma (or fat arrow), it thinks it's a hashref, as hashes are often declared as string, comma, string, comma, etc. But if it sees a unary plus, or a string followed by a dot - basically, anything that isn't a string followed by a comma, it guesses 'block'.

Most likely, perl6 will still be a limited look-ahead parser, and not for instance something generated by Parse::RecDescent. Limited look-ahead parsers are much faster than unlimited look-ahead parsers, due to the fact they can do table lookups, and don't have to backtrack.

Replies are listed 'Best First'.
Re^3: order in map
by ryantate (Friar) on May 04, 2005 at 17:05 UTC
    Interesting. I hope *something* is done about this but it's a bit late for that ;->