News for hackers. Stuff that matters.
Re:What's New in Webpack 2 by nathancahill on Tuesday February 02, 2016 @01:41AM (#11017942)
Huge. Between webpack and Babel, JS is quickly progressing towards becoming a powerful language that is easy to write, read and reason about. I'm currently in the process of moving an inherited "minified by hand" codebase to ES6, and the difference is incredible. Not only are linters catching hundreds of previously unknown edge cases and bugs, but the end result is more performant and smaller in file size. It's very satisfying, makes me not mind coding in JS again.
Re:What's New in Webpack 2 by DCoder on Tuesday February 02, 2016 @02:50AM (#11018120)
Have you looked into TypeScript? Type system helps you catch even more errors.
Re:What's New in Webpack 2 by seivan on Tuesday February 02, 2016 @04:25AM (#11018441)
Second this. There is no reason not to use TypeScript now that's easier to work with .jsx and add 3:rd party libraries without dealing with type definitions.

Also, make sure to try out atom-typescript by Basarat. It's genuinely amazing and feels like Swift. :)

Re:What's New in Webpack 2 by egeozcan on Tuesday February 02, 2016 @04:49AM (#11018523)
Another supporter here. I was very reluctant at the beginning but after seeing how it helped catch bugs earlier, I can't go back. I actually think that TypeScript makes JS more flexible because of the patterns it enables. I enjoy it even more than C#.
Re:What's New in Webpack 2 by Sir_Cmpwn on Tuesday February 02, 2016 @07:19AM (#11018983)
Since adopting Redux, I've not seen many advantages of TypeScript. My codebase is just pure functions that describe simple state objects. What sort of advantages do I stand to gain by bringing in TS in this situation?
Re:What's New in Webpack 2 by s986s on Tuesday February 02, 2016 @08:41AM (#11019337)
When implementing overloaded functions, explicitly defining an interface would allow for much easier debugging than testing it afterwards. Running tests (that can take up to seconds sometimes) is far less efficient than seeing the problem nearly immediately
Re:What's New in Webpack 2 by Keats on Tuesday February 02, 2016 @05:33AM (#11018643)
Another vote, catches so many errors and if decide to refactor you can pretty much just follow the compiler errors till it compiles.
Re:What's New in Webpack 2 by k__ on Tuesday February 02, 2016 @06:24AM (#11018814)
Why not purescript or elm?

I have the feeling that those Haskell like type-systems are superior to this whole Java/C# stuff.

Re:What's New in Webpack 2 by Matthias247 on Tuesday February 02, 2016 @10:39AM (#11020071)
I would guess that compatibility with existing JS libs is far easier with Typescript. You can trivially consume an existing JS lib from TS or export/compile your TS lib to pure JS, which other JS then can seamlessly consume.

Although I don't have bigger experience with Elm, Purescript, Scala.js, Ceylon, Websharper & Co I guess its more complicated with them. An advantage here is also that Typescript does not bring along it's own standard library (e.g. new collection types) which could cause problems on interoperability.

Another advantage is getting other people on board. Getting developers from pure JS to typescript is not difficult, especially when they are used to Java/C++/C# (which most developers are). The learning curve for the other languages will be higher for most developers.

Re:What's New in Webpack 2 by Keats on Tuesday February 02, 2016 @06:45AM (#11018875)
Well those 2 are entirely new languages, not just javascript with types added so they are not the same thing.

Not everyone knows or want to learn Haskell