Hacker News new | ask | show | jobs
by na85 4334 days ago
Javascript. It's possibly the worst language I've ever had the misfortune of coming across, and it's gained this cult-like devoted fan base amongst the startup crowd. Everyone tries to cram Javascript into applications it's completely unsuitable for like desktop non-browser 3D gaming or encryption. It is an enabler of pervasive surveillance by marketers and a huge security risk for the privacy-conscious. Not to mention every web developer thinks the pinnacle of web design involves a megabyte of jquery or whatever is fashionable these days, reinventing parts of the browser's functionality like fading content in instead of just letting me scroll the fucking page.

I wish javascript would just die already. I greatly prefer static or server-side dynamic sites. I miss the days when you just had a PHP session, and when you posted your message it didn't show up until a refresh.

My animosity towards javascript and javascript developers simply cannot be overstated.

6 comments

As someone who grew up with C and C++ have to say that I rather like Javascript. Sure it has its hacks and edges but whenever I code stuff in it I find myself being about 5x more productive than using Java or C/C++.
Why would your animosity be targeted at the language and the developers.

The market wants what the market wants. Surely most of the time, in most cases, it is the client that signs off a design and a developer follows the brief?

Javascript is fine in itself as a language, but no one uses it like it's meant to be used. It's a prototype inheritance language and yet people try to use it like regular java (classes and instances).

The problem you probably have is with the DOM, not the language.

No, my problem is definitely with the language. JavaScript has some PHP-level horrors in it, especially when it comes to type coercion.
I can't believe I'm having to stick up for javascript... I don't particularly like it myself, and I think the growth of node.js oven the past few years is one of the biggest jokes in our industry... But that said, every language has its surprises when it comes to coercion/equality/etc. When you move from Java to Ruby you get burned by the differences and when you move from just about anything else to javascript you suffer as well.

You as a programmer just have to know the differences between these languages and work appropriately.

Again... I can't believe I'm sticking up for javascript. I prefer strongly typed languages that can have projects with several dozens to hundreds of developers.

But I can see the appeal for javascript and other prototype inheritance languages. My first two languages were Dylan and Newtonscript.

I think I can discern for myself whether I dislike the DOM or Javascript, thank you very much.
You only talk about client-side related features. Nothing about the language itself. I don't mean to be autistic - I now understand what you meant but it wasn't clear from the start of your post.
I am so happy I saw this post first. You made my Sunday.
Can you share more about what's stopping you from using other languages rather than Javascript?
Worse than PHP? :)
Sure. I'd rather use a PHP site with good, lightweight CSS than a site loaded down with AJAX and jQuery. Any day of the week, ESPECIALLY on mobile.

13-year-old kids still in high school styling themselves as "PHP Developers" is what gave PHP a bad rap. They're the reason PHP-Nuke existed. But novice developers produce mediocre code irrsepective of the language.

I'm not saying it's the best thing ever created. I've never used PHP 5 but there's not really anything fundamentally wrong with PHP4 other than clunky syntax and stupid choices in naming some intrinsic functions. It's certainly easier to hang yourself with, say, C than with PHP.

Syntactically, I would say javascript is better than PHP. PHP only recently got around to allowing array shorthand, and I don't even know if the most recent version has anything like js' object shorthand. The way javascript handles anonymous functions and closures is better too - it's just easier to write.

Though whenever the DOM gets involve, both break down into awkward messes.

In my experience AJAX is used a lot to do the opposite of 'loading down' a site. Often used for staggering page load - preventing a huge download time at first page load and means one page sites can be possible, with many images even, and not take 2 minutes to download on mobile.
i wish i could vote this down