3 ms·
I have been developing javascript since the late 90's and love it. I don't understand the hate for it today in the sense that everyone tries to get away from i
by drawkbox 13y ago
I have been developing javascript since the late 90's and love it. I don't understand the hate for it today in the sense that everyone tries to get away from it, why create so many code generators essentially?
Javascript is not that complex and in most cases maintaining the javascript and sugar syntax version with a code map for debugging seems like overkill (depends on the situation but in most cases it is more work). Many of these sugar syntax pre-compile libs/steps to javascript also act alot like Python which is great, but javascript compels people for some reason to stop creating it directly. So in that sense it is a bit like assembly in people wanting to wrap it, but it is very high level in itself.
That being said I do use pre-compile steps for CSS/JS including LESS, SASS, and Coffescript when the project fits which do have some productivity gains, but unless it gives me immense advantages like asm.js and native speeds, why the extra layers for minimal gains?
- brandonhsiao 13y agoHonestly, when I use SASS/Coffeescript it's not performance I'm thinking about. Most of the time it doesn't matter for the stuff I make. The reason I use these things is simply so I can type less. I don't have to type brackets/semicolons, I get all the syntax shortcuts in Coffeescript, whatever. It's so restricting when you can't type as fast as you think, and JS -> Coffeescript gets you closer.
- drawkbox 13y agoTrue, I guess we'll continually make our way to Python syntax. It is the same reason I love writing Python, less typing, more correctness and power.
- lucio 13y agoI guess it depends on the size of the project. I've reached a point, in pure js projects, at which refactoring code was too risky. It's too easy to introduce subtle bugs in pure js, just with a typo. After hours lost debugging js code. You end up with certain fear to touch code that's already tested. By migrating some projects to LiteScript I've found bugs lurking in js code I believe was bug-free. Also with LiteScript I found myself coding faster, fearless, trusting the compiler to catch typos and object misuse. Javascript is great, wonderful. I love it too. Prototypal inheritance is also a refreshing approach to OO. But it was not designed to scale. And that's ok. It was designed to be a script to add dynamic properties to HTML pages. Simple, powerful, global var by default, return undefined if property does not exist (instead of throwing). This are good decisions for the original purpose, but they do not scale.
- nilved 13y ago> [5] + [5] "55" This is why people don't like JavaScript.
- tg3 13y agoWhat would you expect the behavior to be there? [5, 5]? I know that JS has its quirks (to say it nicely), but once you understand it (type coercion, equality, scoping, etc) it doesn't seem to be a huge burden to me.
- nilved 13y agoYes. That's the behaviour in Python, Ruby and just about every other language with overloaded operators.