5 ms·
So... CoffeeScript with curly braces? On a more serious take: as a Node.js developer I can't wait for generators to be ubiquitous!
by kaoD 13y ago
So... CoffeeScript with curly braces?
On a more serious take: as a Node.js developer I can't wait for generators to be ubiquitous!
- aa0 13y agoCoffeeScript is a debauchery of JS. With ECMAScript 6 you won't need CoffeeScript for anything except maybe it's inline printf-like string substitution.
- camus 13y agoCoffeescript saved JS dev. It proved we did not have to wait for TC39 lto get new language features.
- egeozcan 13y agoMeh. It doesn't even support getters and setters.
- virmundi 13y agoDon't use "objects". Embrace the associative array that is a JSON (I know, Object is in the name) construct. Getters and setters are not necessary with this.
- dragonwriter 13y agoHow does using associative arrays reduce the need for non-trivial getters and setters? I see how it provides an alternative to trivial getter and setter pairs; just as using bare public data fields in a language that supports them does, but non-trivial or non-paired (getter or setter alone) or different visibility ones seem to be a different issue.
- virmundi 13y agoMy belief is that in a functional language like JS, you shouldn't couple data with operations on itself. As a result, all you'd ever have is non-trivial getters and setters. You see this with map like constructs in Erlang. You'd have a function that takes a map and does stuff.
- Joeri 13y agoSystems built with large teams need to have their developers negotiate API boundaries. Strict typing and intelligent getters/setters help a great deal to achieve this because the code becomes self-negotiating. A second problem with large teams is that most programmers can't write pure functional code, turning the codebase into a hybrid mess. ES6 matters most for large teams because the inefficiencies of ES5 are felt most on those kinds of scale. I'm also doubtful how well DOM programming can be mixed with a functional approach, but i'll concede that it is at a minimum possible to do it.
- dragonwriter 13y agoI don't think it's true that most programmers can't write pure functional code; I think it is more the case that that most programming languages don't provide good support -- particularly constructs that make the distinction between pure and impure code clear -- for programmers who wish to write pure functional code or at least to cleanly segregate pure and impure code.
- egeozcan 13y agoWhen I'm writing code, getters and setters are a huge help for abstraction. I won't give up using a feature only because it's not the "convention". Look at the trouble frameworks like angular and knockout go through (secondary event loop, calling functions for assignments...) because some browsers do not support getters and setters. I can use them on the server side at least.
- aa0 13y agoEmscripten is far more worthy of the phrase 'saved JS dev.'
- jameswyse 13y agoYou can play with them just now in 0.11.2 if you run node with --harmony or --harmony-generators. Can't really use them in modules until it's in core though.
- a-l-c-o 13y agoI wonder why even play with them until ES6 features are confirmed (though it feels like they will). It's very interesting and tempting but would end up as a loss of time if they are not.
- deleted 13y ago[deleted]
- apaprocki 13y agoAndy Wingo is working on generators in SpiderMonkey now that he landed them in V8. Goal is to get FF/Chrome parity. (If anyone on the IE team is reading...)
- pjmlp 13y agoMobile is what matters nowadays.
- portmanteaufu 13y agoThis seems like a non-sequitur. Could you clarify?
- pjmlp 13y agoWe are forced to use only JavaScript features that are available on the system browsers of the mobile platforms, when doing web projects for mobile platforms. So it does not matter what Firefox or Chrome support on the desktop, if those features are not widespread on the mobile platforms.
- portmanteaufu 13y agoAre the mobile editions of Chrome and Firefox far behind in their Javascript support? I was under the impression that those two were pretty much up to speed with their desktop versions.
- pjmlp 13y agoThis does not work like that. It is the same thing as with IE 6. You cannot assume everyone has a mobile device with the latest Firefox or Chrome version installed. Most people only use the system browser, which can be whatever Webkit version depending on the iOS or Android version, Bink or mobile IE. Some people might install the mobile versions of Firefox. So as always, one is quite constrained if the goal is to target any mobile device with the same codebase.