News for hackers. Stuff that matters.
Re:JavaScript is Good, Actually by peterbraden on Wednesday May 16, 2018 @06:37AM (#17081317)
Oh man, I hate these articles as they bring out the trolls.

Javascript is a great language because it allows you to develop incredibly fast (scripting language) for a platform that runs everywhere (the web).

It used to be far simpler, but IMHO, insecurity because of all of the FUD that this sort of article prescribes, has meant that the language has bloated to incorporate all sorts of syntax improvements and new patterns.

It's not a systems programming language, so all the comparisons against typed, compiled languages are moot. Introducing transpiling as a mandatory pattern for JS development was a mistake.

The reason JS has won is because the web has won. Arguing about its merits misses the point.

Re:JavaScript is Good, Actually by macspoofing on Wednesday May 16, 2018 @06:59AM (#17081403)
>It's not a systems programming language, so all the comparisons against typed, compiled languages are moot.

No they are not 'moot'. At least not if you're building applications with 100k+ LOC. For dinky websites and small projects I'm with you.

>Introducing transpiling as a mandatory pattern for JS development was a mistake.

Again, what are you building? A dinky website, or a large application that you'll have to maintain for the next 10 years?

Re:JavaScript is Good, Actually by peterbraden on Wednesday May 16, 2018 @07:53AM (#17081647)
Transpilation is the number one reason I've seen that makes maintenance of older projects hard. The fact that JS didn't standardize on a module syntax until far too late means that we're forced into a transpilation cycle to build bigger projects. I can call that a mistake without denying it's reality.

If you want to build a web application, at some point, until we have true web assembly, you will have to use javascript, which does make a lot of the arguments here moot, regardless of the size of the project.

Re:JavaScript is Good, Actually by macspoofing on Wednesday May 16, 2018 @08:20AM (#17081768)
>Transpilation is the number one reason I've seen that makes maintenance of older projects hard. The fact that JS didn't standardize on a module syntax until far too late means that we're forced into a transpilation cycle to build bigger projects. I can call that a mistake without denying it's reality.

You answered your own objection. The language is deficient so alternatives are sought (lack of standard modules is one problem). Nobody likes transpilation and nobody would do it if JavaScript was conducive to building and maintaining large applications.

>If you want to build a web application, at some point, until we have true web assembly, you will have to use javascript

No. You can build it in TypeScript or Dart or any number of more sane language and transpile to JavaScript. Which is what people are doing.

Re:JavaScript is Good, Actually by peterbraden on Wednesday May 16, 2018 @10:46AM (#17082799)
>No. You can build it in TypeScript or Dart or any number of more sane language and transpile to JavaScript. Which is what people are doing.

Exactly, you can't avoid javascript. Transpilation is at best a level of indirection.

I'm not answering my own objections, rather I'm pointing out that transpilation is a necessary evil, but it _was_ a mistake compared to the alternative, namely fixing modules.

Re:JavaScript is Good, Actually by hungerstrike on Wednesday May 16, 2018 @09:13AM (#17082088)
No, they are moot. I've built several 100k+ LOC apps with JavaScript. You have no clue what you're talking about.
Re:JavaScript is Good, Actually by Sharlin on Wednesday May 16, 2018 @10:01AM (#17082412)
How many of them have you had to maintain for several years?
Re:JavaScript is Good, Actually by hungerstrike on Thursday May 17, 2018 @01:12PM (#17093208)
Three of them.
Re:JavaScript is Good, Actually by lol-lol on Wednesday May 16, 2018 @09:23AM (#17082153)
If you only have hammer everything looks like nail. You will enjoy other languages much more.
Re:JavaScript is Good, Actually by btbuildem on Wednesday May 16, 2018 @10:18AM (#17082564)
10 years??

You will have to refactor everything and entirely change your toolchain every two years. If you had the misfortune of using some framework, it will no longer be supported by then.

No JS application has that kind of longevity, because the entire ecosystem is extremely volatile.

Re:JavaScript is Good, Actually by jug on Wednesday May 16, 2018 @09:35AM (#17082230)
I think you touched on a key point. Javascript IS a decent scripting language. Treat Javascript as a scripting language and not for general large scale application development and you will probably be pretty happy.
Re:JavaScript is Good, Actually by jrs95 on Wednesday May 16, 2018 @09:18AM (#17082116)
Arguing about it's merits doesn't miss the point at all because it isn't limited to the browser. Even other dynamic languages generally have a better design and are much easier to debug in production in my experience.

Also, people making legitimate criticisms about a technology (in this case to try and cut through the hype train a bit) are not 'trolls'.

Re:JavaScript is Good, Actually by ricardobeat on Wednesday May 16, 2018 @03:50PM (#17085843)
This was true 7 years ago. Today JS is in frontend servers everywhere, and powering everything from games to IoT to developer tools, robots and smart fridges. All things that used to be territory of typed/compiles languages.
Re:JavaScript is Good, Actually by acjohnson55 on Wednesday May 16, 2018 @01:07PM (#17084146)
I'm greatly in favor of the syntax changes. Working with the idiosyncrasies of data in JavaScript used to be a huge pain in the ass. Underscore/Lodash improved that story quite a bit. But ES6 goes a long way towards increasing the expressiveness of the language, such that code doesn't get bogged down in tedious data manipulation and language noise. Unfortunately, the space of possible improvements is a bit limited by the need for backward compatibility (e.g. they couldn't achieve expression-based programming, outside of single-expression arrow functions), but it's still quite good.
Re:JavaScript is Good, Actually by pjmlp on Wednesday May 16, 2018 @06:54AM (#17081381)
My mobile devices and ChromeOS adoption of Linux and Android native apps prove otherwise.