Hacker News new | ask | show | jobs
by jackewiehose 2498 days ago
> I remember when this was switched on [...] and nothing broke (or at most one random thing broke), because basically people already put whitespace around their infix operators

So you are saying that code like a=b-c+d completely changed its meaning? Would this example become a = b-c + d or a = b-c+d or a=b-c + d or ...?

I just can't imagine how you would change an existing language to such an extent.

1 comments

The oddest lesson of Perl is that, even though there’s a million ways to do it, not all of them are used. It turns out that coders generally realize that the constructed examples you show above are all problematic for reasons unrelated to the change!

“What is b-c, is that a variable or a math?”

“Is it (a=b-c)+d or a=(b-c+d)”

So you simply wouldn’t encounter code written like this, because it’s just as confusing as it is problematic for the hyphen change.