Hacker News new | ask | show | jobs
by mst 3429 days ago
Huh. In perl (and javascript) x += 1 is an expression that returns the new value of x.

I guess this is another "simplification" along with the magic scoping model (I want perl's my/ES6's let damnit sulk) ...

1 comments

x += 1 should be a statement rather than an expression. It's not just a value, evaluating it has an effect.