3 ms·
You have to stop worrying and learn to love the bomb ;p In all seriousness, I feel that a lot of people(me included) go through a period of hate for javascript
by nkassis 15y ago
You have to stop worrying and learn to love the bomb ;p In all seriousness, I feel that a lot of people(me included) go through a period of hate for javascript until they find that it's actually has some impressive expressiveness using very small set of things.
- conradfr 15y agoYou must be right. It is like I still have the stigma of the early days of Javascript in the browser. I do mainly PHP so it's not like I can't overcome bad design. I routinely try to get a fresh perspective of JS but it does little. I praise jQuery everyday though.
- whamill 15y agoGet a hold of Douglas Crockford's 'JavaScript: The Good Parts' book. JS is so incredibly pervasive you're going to have to put up with it, so you may as well see if you can get along with the nice features like closures, functions as first class objects and prototypal inheritance.
- ryanbrunner 15y agoI definitely have a very strong love / hate relationship with javascript. On one hand, you can be very expressive with Javascript and it absolutely can be an incredibly flexible language with a lot of power. On the other hand, there's a LOT of warts in the language. Random reserved words like 'class' that don't even fit the language's approach, variable scoping that can very easily bite you in the ass if you don't know what you're doing, optional line terminators that seemingly exist for no reason other than to create bugs, stuff that should be avoided at all costs like 'with'. And that's just scratching the surface.
- nkassis 15y agoYeah I agree on a lot of the points you mentioned. Block scoping would have been better in my view also. But there are tools, like in other languages, to ease that pain. I never forget a semicolon due to using js2-mode which makes missing semicolons stand out. JSLint and other tools of the sort help find bad code too. And the in browser tools like the Chrome dev tools with a debugger,tracing,console really make it much easier. Javascript without the tools would be a real pain.
- alextgordon 15y agoYou know, what I hate is the JS community. It seems JS is split into two camps: 1. Ordinary people trying to get something done. Often not professional programmers. These people account for most JS on the internet. 2. JS hipsters. The kind of people who use Node.js and worship Crockford. They refuse to accept that anybody might want to use a language other than JS on the web, or that if you only accept the "Good Parts", you'll be set for life (where's my static typing, bitch?). Languages are as much people as they are technology. I use Python because I like the people who use Python. I use Haskell because the people who use Haskell are really gentle and humble. Good, reasoned people lead to good, reasoned code. I don't see that with the JS community.
- whamill 15y agoPerhaps the JS community you portray doesn't just exist in two discrete attitudes. As far as I see it, JS is a fact of the current web so trying to get the best from it is the easiest way to dull the pain of what is often clumsy and irritating. There are certainly places and uses where static typing would be great and the web is no exception but JavaScript isn't suddenly going to go away just because it's easy to write bad code, or because a load of 'hipsters' are making some flavour of it popular at the moment.