Live data from Hacker News

For modern development Javascript indeed is a shit language

live.julik.nl

21–30 of 243 posts

Re: For modern development Javascript indeed is a shit language

#21
post #7

Personally, I disagree. I find JavaScript to be the most "write-able" language, and switching to Node + frontend JS as my main language (I've done Python, Ruby, PHP, Java and C++ as jobs) has been the best thing I've done in a long time. Express and Angular are amazing. Sure, it has a bunch of quirks. Sure, it's not good for everything (I do mostly relatively simple CRUD apps). Sure, in the browser, it gets slow when…

How do you handle Javascript ignoring wrong numbers of function arguments? Do you use a linter to catch this sort of thing? This part of Javascript sounds the most absolutely insane to me: Silencing an error like that is catastrophic.

Generally speaking, in the JS world at least, if you're passing more than a few parameters into a function you might have code complexity problems. If you need to pass in a bunch of data to a function you tend to do it in a single options object with some runtime checking to work out what to do with it. Any remaining problems should be caught with good test coverage. Being able to flexibly and clearly handle variable numbers of function arguments without getting entangled in an involved function overloading syntax and methodology is actually sometimes pretty nice. It's a feature not a problem. Haha :P

Re: For modern development Javascript indeed is a shit language

#22
It's interesting to see so many people say "JS is great and we used it to build X" on one side and people who hate JS on the other side.

Obviously Node (and JS) has some things that it is strong in. People use it to build those things. Good developers won't use a tool in their box which is inferior to another tool they can use effectively. In between, there is a lot of room for "good enough" where tools overlap.

I think some developers are able to largely stick with a certain tool because development goes in waves. I can spend multiple months on a certain profile of work and then get hit with the same type of project a couple more times. Maybe by then I become an expert with that thing and I just keep doing those sorts of projects. You might think I'm crazy because I'm a "Node developer" but you probably don't know the nature of the work that I do.

Eventually I get hit with a different project and everything falls apart if I try to keep using the same tools as I had been using. So, I curse myself for being stupid and wasting time and start over with the tool I should have been using in the first place.

Some developers might have such a limited set of tools that they can't (or won't even try) to switch.

"So, I landed a big gig for the government. It's a healthcare site. I'm going to build it in Wordpress."

Following this thread further, look at some of the selling points of Node.

* It's great because as a front-end developer, you probably already know JS. With Node you can use JS on the back-end also!

* Because the front-end and the back-end are both in JS, I can use one programming language and re-use libraries for each side.

Great, let's encourage people who only know one programming language and a limited range of tools to just stay in that box.

There are things that X tool does well. There are things that X tool is horrible at. Perhaps rather than ragging on Node, the author should write an article explaining that developers should be expanding their tool-set so they have flexibility in handling different types of problems.

Re: For modern development Javascript indeed is a shit language

#23
Yes, JavaScript is terrible. But JavaScript is not the end of programming languages, it is a step for the next big language.

I think everybody agree that different languages for frontend / backend development are the not the best solution, so JavaScript is a big step forward.

But i think soon it is necessary for a complete rebuild for a new language, with all the things included that we learned and invented from the "old" languages.

Dart, TypeScript, Coffescript, and the 1.000 other language Modifications / frameworks try all to fix a little part of the problem. Thats nice but annoying too.

Re: For modern development Javascript indeed is a shit language

#24

Despite most of the points in this post being debatable — there's one bit that caught my eye: "Being nice will not help it, and CoffeeScript is not radical enough." As the guy who started CoffeeScript, I agree. It's an intentionally very conservative approach. But there's more than one good way to skin the JavaScript cat. I think it would be fun to take another run at the same problem — attempt to find a minimal, rea…

Keep up the good work!

I still think the main point around javascript is the type system or the lack thereof. I don't mind dynamic typing, but the javascript data types are central to all HTML5 APIs and most existing libraries. CoffeeScript gets this right, many others don't.

Re: For modern development Javascript indeed is a shit language

#25
post #22

It's interesting to see so many people say "JS is great and we used it to build X" on one side and people who hate JS on the other side. Obviously Node (and JS) has some things that it is strong in. People use it to build those things. Good developers won't use a tool in their box which is inferior to another tool they can use effectively. In between, there is a lot of room for "good enough" where tools overlap. I th…

>Obviously Node (and JS) has some things that it is strong in. People use it to build those things. Good developers won't use a tool in their box which is inferior to another tool they can use effectively. In between, there is a lot of room for "good enough" where tools overlap.

People use JavaScript not because it's good but because it's the only option to develop in a browser. Having the same language on the client and the server is a very strong point, that's why they use NodeJS.

Re: For modern development Javascript indeed is a shit language

#26
As someone who maintains old 1000+ KLOC projects I have to agree. Have look at some large old Perl projects to see how JS code will look&feel in 10 years.

But on other side I see JS bytecode as great alternative to Java and JVM. Modern languages usually include JS as compilation back-end.

Re: For modern development Javascript indeed is a shit language

#27
post #5

I'm very glad JavaScript is the language of the web. It has a combination of things I like that I don't find in many other languages: * lexical scope * first-class functions * prototypal inheritance

Not many languages have prototypal inheritance, but most modern languages have first class functions these days. And what sane language uses dynamic scoping?

Re: For modern development Javascript indeed is a shit language

#28
post #17

Personally, I disagree. I find JavaScript to be the most "write-able" language, and switching to Node + frontend JS as my main language (I've done Python, Ruby, PHP, Java and C++ as jobs) has been the best thing I've done in a long time. Express and Angular are amazing. Sure, it has a bunch of quirks. Sure, it's not good for everything (I do mostly relatively simple CRUD apps). Sure, in the browser, it gets slow when…

I see this all the time. JS is slow because of the dom. No. JS is slow because JS is slow. Yes, I know V8 makes it faster than it used to be. Yes I know it is neck and neck for computation, but because of the way memory is handled it is slow for loading large dictionaries. But I could forgive all of that. JavaScript is not well designed for work in a team environment, nor is it well designed for Large Code Bases. But…

>"JS is slow."

In comparison to what? JS is one of the faster script languages out there. V8 is way faster that Ruby and outperform python a lot of time as well. It's regex is blast fast as well.

Re: For modern development Javascript indeed is a shit language

#29
post #17

Personally, I disagree. I find JavaScript to be the most "write-able" language, and switching to Node + frontend JS as my main language (I've done Python, Ruby, PHP, Java and C++ as jobs) has been the best thing I've done in a long time. Express and Angular are amazing. Sure, it has a bunch of quirks. Sure, it's not good for everything (I do mostly relatively simple CRUD apps). Sure, in the browser, it gets slow when…

I see this all the time. JS is slow because of the dom. No. JS is slow because JS is slow. Yes, I know V8 makes it faster than it used to be. Yes I know it is neck and neck for computation, but because of the way memory is handled it is slow for loading large dictionaries. But I could forgive all of that. JavaScript is not well designed for work in a team environment, nor is it well designed for Large Code Bases. But…

Some would argue that Flash's death was hastened by JavaScript, not the other way around. (And Steve, and..)

Re: For modern development Javascript indeed is a shit language

#30
Google Closure Compiler + @struct = new property definition outside of constructor is forbidden.

Or DEBUG_ON && Object.seal(this); at the end of every constructor.

Here, I've fixed "Hobjects" for you.

JavaScript allows you to write shitty code, but whether you do it or not is just a matter of skills and tools.

Post reply on HN