Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The problem with making scope always explicit is that you then need to explain scope to newbies. Sure, it's worth explaining, but you just lost half your audience.

That's a price I'm willing to pay for the pain it brings later on.

> Based on the success of BASIC (and indeed many, many early programming languages), global variables are easy to understand, local variables are less easy to understand.

It's not like explicit scoping prevents users from abusing globals...

> It's all very well to complain about JavaScript's lack of Important Language Feature X

Actually, if you read my comment instead of going off about an alternate reality comment you may notice I'm complaining about a feature of javascript I think is misguided, not about the lack of a feature.

> Along with many other Language snobs, I used to despise JavaScript

I never despised javascript. Still don't. But after a decade of development, as I've said I've come to view scope inference as a misfeature.

> Compare that to ActionScript 3 and the byzantine Flash/Flex (and constantly changing) class library and then decide which one deserves the adjective "abominable".

I don't think I have used the adjective "abominable" anywhere, and I really don't care for ActionScript under any of its forms.



re "abominable" -- I'm still talking about the original article ;-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: