Live data from Hacker News

Ask HN: I hate JavaScript

news.ycombinator.com

21–30 of 33 posts

Re: Ask HN: I hate JavaScript

#24

You could try CoffeeScript. It takes away a lot of what people don't like about JavaScript out, and replaces it with a decent syntax. I personally love well written vanilla JavaScript, but CoffeeScript might give you a little better experience if you "hate" JS. So, is it the DOM you don't like, or the actual JS syntax and structure? For me, when I overcame the weakness of the DOM API, and utilized it elegently, I sta…

its just javascript, its so error prone, it can take hella long to write simple algorithms, because of some undefined error. compare that to golang, even though u make errors, the compiler is so awesome at pointing those out. And u can get so much done

I get that you like Go, but you can't run Go in a web browser. Ultimately, whatever you write will have to be evaluated in a web browser, which means it will be JavaScript at some point. Just like you've observed with CoffeeScript, writing in a different language is just a layer of abstraction on top of JavaScript.

Web apps have a back-end and a front-end. You can definitely write the back-end without touching JavaScript. You can even write it in Go. Square did a nice writeup comparing several:

http://corner.squareup.com/2014/05/evaluating-go-frameworks....

When it comes to browser side, you're stuck with JavaScript though. Trying to avoid it will only bring more pain and frustration than attacking the problem head-on.

I would point out that programming languages don't make errors, programmers do. I'm no fan of JavaScript. I too avoid it when I can. It's absolutely necessary if you want to write web apps though. As you become more familiar with JavaScript, your error rate will go down.

If JavaScript really puts you off, maybe consider going another direction, like mobile app development. Both iOS and Android applications are developed using compiled languages. You may find them more suitable to your programming style.

Re: Ask HN: I hate JavaScript

#25
You can't even spell correctly--no wonder you hate Javascript.

It's a fairly small language and if you refer to simple best practices (as outlined in, say, Javascript: The Good Parts) you won't have a bad time at all.

It's the first language to introduce closures to the masses, the only language that is really at home in an HTML document (some newcomers aside), and on the server it's quite easy to quickly bash something together in Node.

Blindly declaring that you hate the lingua franca of webapps is pretty difficult road to hoe. What's your issue?

Re: Ask HN: I hate JavaScript

#26

You could try CoffeeScript. It takes away a lot of what people don't like about JavaScript out, and replaces it with a decent syntax. I personally love well written vanilla JavaScript, but CoffeeScript might give you a little better experience if you "hate" JS. So, is it the DOM you don't like, or the actual JS syntax and structure? For me, when I overcame the weakness of the DOM API, and utilized it elegently, I sta…

its just javascript, its so error prone, it can take hella long to write simple algorithms, because of some undefined error. compare that to golang, even though u make errors, the compiler is so awesome at pointing those out. And u can get so much done

It is a poor workman who blames his tools.

Re: Ask HN: I hate JavaScript

#27
post #3

What do you hate about it? My biggest transition to being comfortable with it was to find a happy place in terms of editing. After years of C/C++ it was not easy to be picking fragments of code out of DOM bellyfluff lint. So how do you use javascript dev tools and what don't you like about them I guess?

just a week ago, i made a test for myself, i decided to write merge sort in golang and javascript. My golang program was complete in like 10min, but javascript program took 2 hrs. I dont know if its just me, but i tend to make small errors while programing, like making sure a variable is not undefined and stuff. Even though my logic was perfect its just very difficult to debug algorithms in javascript, let alone any…

'use strict'; will help you a little with javascript.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re: Ask HN: I hate JavaScript

#29

Earlier quoted context omitted.

its just javascript, its so error prone, it can take hella long to write simple algorithms, because of some undefined error. compare that to golang, even though u make errors, the compiler is so awesome at pointing those out. And u can get so much done

It is a poor workman who blames his tools.

works both ways : a good workman choose good tools.
Post reply on HN