31 points · by gitgud · 8y ago · 48 comments
But it runs extremely easily on pretty much everything! and can be distributed and run instantly through any browser.
Maybe I feel like it's too easy compared to other languages and is downplayed as a newb language...
Maybe it just doesn't seem as cool as other languages like rust and go...
Javascript is a big, sprawling, and (from day 1) very useful language. Like English, it has many many flaws and has many antecedents. Like English, it's evolved to be highly functional. The last two versions are first rate languages. The runtime environments (browsers, compilers, etc.) are among the most sophisticated, comprehensive pieces of software passionately maintained by some of the smartest people in the world working in friendly competition, and we don't have to pay a red cent for their work product.
I started programming in 1983, so about 7 years after the microcomputer took off. The very first version of Javascript was a shaggy dog but it was far more capable than interpeters selling for hundreds of dollars at that time.
The pedants who bitch about Javascript should get over themselves. I wish my life had so few problems that I could spend my precious time on this planet denigrating something given to me and every browser user for free.
JavaScript is what enables me to make stuff I couldn't make with the same amount of time/effort using any other tool I came across.
Do I wish I could do the same stuff using Racket? Sure, I guess. But in the world I live in, JS is the best tool I could find for doing what I want.
Also maybe it's just me, but I've been programming for 5 years, and I haven't actually ever felt that frustrated or inadequate when programming JS, I like it no less than python.
I got used to looking down on JavaScript as a "bad" language from reading snarky comments made by people who, I suspect, also jumped on the hate train because they've heard others talking shit about it. I'm not a computer scientist, maybe there are some legitemate reasons to dislike JS, but I don't think they're serious enough to warrant all the hate it gets in programming community, I'm guessing it's mostly a social phenomena.
At least personally I haven't run into things that make me dislike it, I have a lot of fun using it.
Also remember that at various times, PHP, Ruby, Python, Perl, COBOL, ColdFusion, literally anything made by Microsoft, Java, and countless other languages that solved plenty of interesting problems and both led to people getting paid but also improving and creating other things have been laughed at.
As a converse, plenty of people have made absolute garbage in any number of open source frameworks, "sexy" languages du jour, etc. either because they were working alone and didn't think they needed help or what they were working on wasn't remotely suited to the tool.
Ignore the haters. It's usually gatekeeping coming from lack of confidence and fear of real competition due to years of poor attitudes in our industry on what makes a "real programmer".
- Libraries that makes it efficient ;
- Plenty of styleguides / do / don't rules which makes it tidy ;
- TypeScript, where JS becomes statically typed ;
- Find beginners in any other languages, although "full of beginners" is actually positive, rather than negative.
- You can feel like a real pro if you write C / C++, but you will rarely be hired to make a REST API with that stack and you will not be hired to create a web app with it. So your statement might be more accurate if you say "Web development is downplayed as a newb", which is obviously wrong. Sure I would not recommend to write a database based on NodeJS or a search engine, or a space shuttle program, or a ... you name it, but you can't write with anything else ( at least serious ) than JavaScript or something that compiles to JS, for web development.
- Cool is also relative. I was writing Perl for 6 years, before I run out of job prospects and switched to NodeJS.
The only reason to be ashamed would be if you only program in JavaScript and can't imagine ever using anything else. Learn many languages, master some, use different languages for different problems.
>> It's inefficient
Well, its at least as efficient as python or ruby (I think its even slightly better). If you work on the backend side, and performance is the main goal, there are other technologies better suited: Go, C#, haskell
A problem might be the concurrency model, but that is an entirely different topic.
>> messy
Depends on your ability to organize code. Its not that much different than other technologies, really.
>> not typechecked
True, but there are other dynamically typed languages... People implement thing in them too. And there is always typescript, if you are interested in working typesafe.
>> full of beginners...
Everyone was a 'beginner' at some time in their life...
>> Maybe I feel like it's too easy compared to other languages and is downplayed as a newb language...
There are simple aspects of the language, but take a look at e.g.: Promises[0] or the Prototype inheritance chain[1] and tell me again that it is simple... ;-)
[0]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inhe...
A language is not something you should be ashamed of. You should learn more than one though, so that you understand the advantages and disadvantages of different paradigms and implementations.
Should you be ashamed of loving your hammer? NO, but you should be ashamed of using your hammer to unscrew screws.
But then I realized this didn’t matter. The JavaScript community is was evolving at a ridiculous rate. These weaknesses slowly left their blood, and honestly, now I’m left envious. I enjoy writing Flow, poking around with new ideas like async / await, and envy the sheer performance that JavaScript has attained.
I still find JavaScript and often the people associated with JavaScript to be hard to like at times, but it’s a language with great possibilities.
Don't worry, it's PHP.
Fast-forward to now...I’ve decided to build my startup on typescript and node. I find the easy sharing of libraries and types across frontend and backend very liberating.
TS/ES6 are mature and run everywhere. Easy for beginners but functional enough for me. It’s taken me a while but I love JavaScript.
In case of JavaScript I have one reservation, that by enabling adtech it's helping to screw other people on their own computers. Of course it could be some other language, it's not like JavaScript is inherently for this purpose alone.
But yeah as long as you enjoy what you're doing, you shouldn't worry about it :)
OTOH, I get paid to work with PHP, so really, I don't worry about what other people think of it.
Most of the people I met who denigrated javascript with a blazing hate didn't fully understand its underlying concepts. They were trying to use it like C or something else. Which can lead to frustration.
You should take pride in being good with your tool, understanding how it's designed and how to use it to build awesome stuff.
And yes, it's always a good idea to expand one's skill set. Handling javascript like a boss is one of those skills that a today's programmer can be proud of.
I think an opinionated JavaScript interpreter which considered the worst elements of JavaScript to literally be bugs (e.g. single equals) would help immensely...
Don't worry about that dumb crap. JS is a good language. It's come a long way since its dark early days.
People who shit on JS and on those that like it are usually not worth your time. I find those people are more interested in displaying their intellect or superiority by being condescending. It's not helpful.
Read and watch Douglas Crockford if you haven't. He has extracted the best aspects of Javascript to focus on. If you take his advice then I believe you will find JS to be a very good companion.
Just don't let JS be your only language. No language should be your only language.
While it isn't the language I'd have necessarily chosen to be as widespread as it it, the industry could have wound up making a far worse choice, and I'm grateful it didn't.
It still drives ME crazy because it lets many of my colleagues produce unreadable hard to understand spaghetti code in a way I don’t see with more structured (and tool friendly) languages like C#, Java, or purer functional languages, but well written JavaScript can be a delight.
Even brainfuck is beautiful, maybe is not productive, but its unique.
Don't waste your time worrying about that even if there is not market, if you really like a language you will find a job if thats what you want.
It is however useful to have a critical eye so that one can assess what is the right tool for a particular job.
Well PHP is worth on those stuff..
As long as you can make stuff happen with it, I guess that's fine..
Not sure if intentional pun
JS is a tool, just like on the any other. It has some big pluses, and some annoying “WTFs”, but today, it’s a more-than-solid default answer to “What should I write my webapp in”.
JavaScript's one best attribute was that it would run on any device. No longer true.
It's second best attribute was a simple threading model. Promises and async wrecked that.
The third best attribute was it was easy to learn. But in ES6 there are twice as many control structures to learn, with no added power. =>, class, const, etc. They just add more things to think about, without solving any problems.
Well, except that people didn't like learning closures and prototypes. And now they don't have to. So you can program in JavaScript now without learning it if you want.
And you don't have to write the word "function" and "this" a lot. So you save 2% on code size.
ES5 Forever.