News for hackers. Stuff that matters.
Re:JavaScript async/await implemented in V8 by g_delgado14 on Monday May 16, 2016 @10:03PM (#11710926)
const is more declarative as you can immediately tell that the data isn't going to change throughout the duration of the program (although technically you can change the data, just not the reference).
Re:JavaScript async/await implemented in V8 by lewisl9029 on Monday May 16, 2016 @11:10PM (#11711154)
> although technically you can change the data, just not the reference

This is why I'm hoping to see native JS immutable data structures eventually (maybe it's already in a proposal somewhere?). ImmutableJS and Mori are great, but having a native solution that's available everywhere would be ideal.

Re:JavaScript async/await implemented in V8 by callahad on Tuesday May 17, 2016 @09:09AM (#11713270)
Consider looking at other languages. ClojureScript does a pretty good job at immutability, Elm is great for immutability + strong typing, and PureScript adds in Haskell's advanced type system (typeclasses, HKTs, etc.)
Re:JavaScript async/await implemented in V8 by lewisl9029 on Tuesday May 17, 2016 @03:05PM (#11716384)
Definitely. ClojureScript is what I usually choose for my own projects, but the reality of the front-end job market is that JavaScript still dominates, so improvements to JavaScript itself will still have a significant impact on the lives of developers everywhere regardless of the existence of other compile-to-JS languages.
Re:JavaScript async/await implemented in V8 by shimn on Wednesday May 18, 2016 @03:15PM (#11724884)
When I want to ensure strict immutability, I use an implementation of deepFreeze (https://github.com/jsdf/deep-freeze) that recursively calls Object.freeze() on all child properties. Obviously slower than strict browser support. Does ClojureScript rely on the Clojure compiler to ensure the properties aren't modified or is there some polyfill?