News for hackers. Stuff that matters.
Re:JavaScript Fatigue or My History with Web Development by andrewstuart on Tuesday June 27, 2017 @05:23AM (#14643598)
>> Is that "better and smarter way of working" THAT MUCH BETTER AND SMARTER?

Absolutely yes. ReactJS is an application architecture that is a complete rethink of how to structure client side applications, and it is an architecture that is being applied outside JS and the browser because it is so much better. The fundamental concept of one way data flow from parent to child through the application requires a start from scratch approach, and would be severely compromised were it to be implemented as an "additional" evolution of some existing application framework such as AngularJS. Yes - that much better and smarter.

ES2015/ES7 are radically better languages that make hugely important changes to JavaScript. Yes - that much better and smarter.

Transpilers make it possible to run ES2015/ES7 even on browsers that support only ES5 - that is amazing - yes - that much better and smarter.

Build tools such as minifiers and packers and uglifiers perform magic to shrink and optimise code for a range of benefits including end users performance - Yes - that much better and smarter than sending a chunk of raw JS to the browser.

In short, yes, JavaScript is experiencing a continuous wave of really major and significant improvements that justify ditching the previous generation entirely.

I will say however that breaking changes give me the shits abut for the most part I am willing to endure them - I simply must assume that the changes are for the better because I don't have time to really understand every single change in every library that goes into my application - no JavaScript developer does - nor indeed does any Python developer try to understand every change to all the Python libs that they use.

Re:JavaScript Fatigue or My History with Web Development by brad0 on Tuesday June 27, 2017 @06:50AM (#14644075)
These are good points. In my experience other platforms have the same tooling as JS has been getting over the past few years.

Look at Android for comparison:

- ReactJS: React Native, also any overall architecture like MVVM or MVP.

- ES2015/ES7: JDK 7/8

- Transpilers: Kotlin

- Minifiers/packers: proguard and others

- Gulp and co.: gradle

- Other libraries: android has a number of libraries to handle network requests, image loading, animations etc.

What I'm trying to put across is that JS has transitioned from a language that would show and hide elements of the DOM to a serious language used everywhere.

A good developer takes the time to understand the tooling around their platform and language.

Re:JavaScript Fatigue or My History with Web Development by RonanTheGrey on Tuesday June 27, 2017 @03:18PM (#14648395)
There's a very good point here - JS is being used for way more than just showing and hiding DOM elements anymore. It is becoming a full application language, and to that end requires the features that full application development requires, not just on frontend, but in Node as well.

I have just inherited a project written in 100% ES5 and I had forgotten how obscenely verbose JS <= ES5 really was. Every extra line of code is a liability and will slow down app development. Language features support precision and conciseness and that in turn promotes enterprise-level development. A toy language (old JS) can never support a full in-browser application.

Re:JavaScript Fatigue or My History with Web Development by Peaker on Tuesday June 27, 2017 @06:43AM (#14644020)
If you're willing to use transpilers, why stick to JS at all, when you have a wealth of languages available?

Scala, Purescript, Haskell, Elm, ...

Re:JavaScript Fatigue or My History with Web Development by _ar7 on Tuesday June 27, 2017 @10:04AM (#14645442)
Because JavaScript

1. By far, has the largest ecosystem.

2. If you use a linter, a typechecker (TS or flow), and transpile your code (TS or babel or both), JavaScript is actually a pretty nice language to work in.

Sure it's a chore to set up all the initial tooling, and learn the ins and outs. However, once you're past that, it's usually not worth it to switch.

Re:JavaScript Fatigue or My History with Web Development by Peaker on Tuesday June 27, 2017 @11:03AM (#14646003)
1. The ecosystem is available via bindings too (to most transpiled languages)

2. It's still far from the state of the art in PL design and missing:

* Nice static typing with type inference

* Nice guarantees about null access

* Nice guarantees about interop between client and server

* ...

Re:JavaScript Fatigue or My History with Web Development by unclebucknasty on Tuesday June 27, 2017 @03:01PM (#14648216)
>It's a chore to set up...and learn...

>However, once you're past that, it's usually not worth it to switch.

That is somewhat circular and can be said of virtually anything. That is, for every minute you invest in a tech, the degree to which it is worthwhile to switch to another tech diminishes. I'm speaking primarily about tech like frameworks that is aimed at making us more productive.

The exception might be a truly revolutionary new tech that sharply boosts productivity, but also has a very low learning curve. However, that scenario seems particularly unicorn-ish where JS frameworks are concerned.

Re:JavaScript Fatigue or My History with Web Development by WorldMaker on Tuesday June 27, 2017 @12:05PM (#14646654)
The closer the transpiled language to JS the lower the impedance mismatch. Whatever language I write in, I may need to dive into debugging it as JS. Whatever language I write in, I likely have to use/adapt JS code samples from libraries and dependencies written in JS. More often than not that's a paper-cut; Haskell often has a huge impedance mismatch from x86 assembly but you can still debug it pretty well and FFI into assembly libraries with varying levels of ease based on library documentation.

But especially when you are working with other developers and a mixture of skill levels, impedance mismatches are useful paper-cuts to try to minimize.

Re:JavaScript Fatigue or My History with Web Development by Peaker on Wednesday June 28, 2017 @03:51AM (#14652407)
That argument can be used to justify using assembly because you would sometimes have to drop down to assembly level when debugging native code.
Re:JavaScript Fatigue or My History with Web Development by WorldMaker on Wednesday June 28, 2017 @10:43AM (#14654545)
I mentioned that. There are still programmers that do justify using assembly that way, and many historically. There are many programmers that just C/C++ over C#/Java/et al for very similar reasons.

I agree, it's not a strong argument, but it is an applicable argument to the discussion. There are trade-offs in every decision, and this is a consideration in those trade-offs.

Re:JavaScript Fatigue or My History with Web Development by YeGoblynQueenne on Tuesday June 27, 2017 @09:57AM (#14645391)
Well, to be fair, the difference is that with Python (or basically any other langauge) a change in a library may introduce a bug, but you won't have to throw away the library or even substantially change your code, save perhaps for some temporary work-around- and the bug will most probably be fixed eventually.

With javascript, as far as a I can tell, "change in a library" means you do indeed throw out the library and adopt a new one, then write your entire code again from scratch and repeat the cycle next year. To me, that sounds like madness and just makes me happy I don't have to deal with all this.

Re:JavaScript Fatigue or My History with Web Development by _Tev on Sunday July 02, 2017 @06:03AM (#14681793)
Well the problem lies in exaggerations of not-actually-using-javascript crowd. If the "cycle" would be five years, would it still be that bad? If the previous framework would be of the very first generation of actual workable JS frameworks, and new one brought major improvements, would it still be that bad?

Reality is very different from these discussions.