5 ms·
I fail to get the flak that javascript faces ! Coming from java it was a breath of fresh air. This was the car that let me drive without a seatbelt when i wante
by sh87 9y ago
I fail to get the flak that javascript faces ! Coming from java it was a breath of fresh air. This was the car that let me drive without a seatbelt when i wanted, let the doors be open if i wanted, stepping on the gas accelerated without fail and the brakes functioned fine, i could change the gearbox orientation, choose which side the steering wheel i wanted to be in general let me do what i wanted to without getting in my way. Sure it was not foolproof and i dont want it to be. I like JS just the way it is and I am grateful to it.
- deleted 9y ago[deleted]
- FLUX-YOU 9y ago>I fail to get the flak that javascript faces ! I personally don't like that Javascript has had to have a ton of work done on it to get it to the point of other languages that were better at their first release. It was just a ton of time spent on something that was weak to begin with. If Javascript were better at the beginning, and this same effort was spent on it, it probably would be ruling the world, front and back-end, and be a really good language with great tooling around it. There was a great amount of debate about nulls being a billion dollar mistake, but Javascript probably beats it in monetary damages by far.
- sh87 9y agoSomething wasn’t done right, right off the bat, thats grounds for not liking it, sure. But to dismiss it as immature despite it overcoming most (not all) of those flaws seems unfair. I like it, some dont. I get it. All I ask is to not dismiss it. Folks new to programming find these edge cases as a reason to not learn it. That irks me.
- nightski 9y agoIt has not overcome any of the flaws, we have just learned to work around them. They are still there and can bite you. Some of us value our time and would like to improve our discipline. In other fields it's called being professional. It's a shame we care so little about it.
- sh87 9y agoYou've got me thinking now. Can you/anyone give me 3 solid cases where the flaw was in javascript and not the programmers understanding of the language ? I can't. (Not at the moment at least). Most of the times I got things wrong it was my understanding of how js works that was at fault.
- nightski 9y agoOf course the flaw is always in the programmer's understanding. Langauges do not manipulate or lie to you, they are what they are. However, better tools and languages reduce your cognitive burden. The less mental context you have to work with the more you can focus on the problem at hand. If you have to constantly worry about language edge cases and odd behavior, it really detracts from being able to focus on the problem you are trying to solve. There is a reason languages like TypeScript and Flow exist, they are helping to reduce this large burden JavaScript carries with it. JavaScript is really great for small scripts (which is the use case it was designed for). Anything beyond a few hundred lines starts to carry a lot more cognitive load. Not to mention that we are now building full fledged applications with tens of thousands of lines in this language.
- sh87 9y ago> Anything beyond a few hundred lines starts to carry a lot more cognitive load. Not to mention that we are now building full fledged applications with tens of thousands of lines in this language. Agree completely.
- timrichard 9y ago> Anything beyond a few hundred lines starts to carry a lot more cognitive load. Not to mention that we are now building full fledged applications with tens of thousands of lines in this language. Depends really on how much care was put into the application structure, mostly from the outset. I've followed opinionated styleguides closely on some projects, and have also walked into other swamp projects that snowballed into something massive from a few snippets of jQuery. The difference between working on something that was intended to be maintainable from the start and something that evolved haphazardly is of course like night and day. I still think it's more the people and approach than the tools.
- SwellJoe 9y ago"it probably would be ruling the world, front and back-end" So, what would be different about that? JavaScript does rule the world, front (definitely) and back-end (arguably, but there aren't a lot of contenders for the language that's more popular for new projects).
- eitland 9y agoIt gets flak for the same reason php gets flak. They both more or less accidentally became popular. None of them were very well designed. They both lacked type safety. Unlike php though javascript became not only popular but it actually ended up being the only alternative.
- aaron-lebo 9y agoIt's jealousy. Most languages had major design flaws. Rubyists will gladly complain about how OO is bolted on in Python, Python users will gladly talk about how slow Ruby's interpreter was and how god awfully complex the syntax is. Both of them have limitations in their runtimes and are actually catching up to JS in some areas (see Python's adoption of async). We can talk about how baroque CL is or how much Java sucked in 1995, how massively complex C++ is, etc, etc. Those arguments have been made for decades, though. JS is no worse than most languages in various ways, but people are pissed off because their chosen language isn't as popular. Maybe that's a cynical point of view, but these criticisms never get past the most superficial concerns, so it's not obvious why people really care so much.
- andreasgonewild 9y agoJavaScript and PHP are badly/barely designed languages, period; no amount of excuses and comparisons is going to change the fact. Anyone with a bit of experience in either Ruby or Python will tear their hair out when doing JS, because they know it doesn't have to be that difficult. These days it's looking more and more like C++ every day...
- sp4rki 9y agoThis is of course my personal opinion, but I think you're suffering from exactly what OP mentions. I'm not trying to be conflictive or anything, but this is in my experience the same argument that every language evangelist uses. I started with C in my early teens (first book I found, lucky me) and I've gone through the VB, PHP, Java, Python, Ruby, and Javascript phases. Honestly I've seen great engineering in all those languages (maybe not VB) and those projects have all been easy and pleasurable to work with (maybe not Java). I've also seen hideous stuff that's a total sanity destroyer. At least for me the main contributing factor to language dislike is dealing with shitty code. Except Classic ASP... That stuff is poison.
- andreasgonewild 9y agoThat says more about Java than Script though, and I've done enough of that to feel your pain. Coming from plenty of experience with sane dynamic languages (Common Lisp/Smalltalk/Clojure/Julia), it looks exactly like the madness it is. It's a difference in perspective, that's all. It's not about foolproof, it's about having any kind of intellectual integrity at all.