12 ms·
> CoffeeScript How is coffeescript 'daring' in any way ? It is a thin veneer on top of javascript, syntactic sugar for your coffee. Dart is a hundred times mo
by Raphael_Amiard 14y ago
> CoffeeScript
How is coffeescript 'daring' in any way ? It is a thin veneer on top of javascript, syntactic sugar for your coffee.
Dart is a hundred times more daring. It is trying to push optional typing. No mainstream language has such a feature, and not even so much non-mainstream ones.
It doesn't say anything about my opinion of any of those two languages (i actually use and like CoffeeScript), but it just sounds to me like you're looking at syntax only, where the important part of a language is its semantics.
- stcredzero 14y ago> Dart is a hundred times more daring. It is trying to push optional typing. No mainstream language has such a feature, and not even so much non-mainstream ones. I long for the day when statically typed/dynamic language debates are considered quaint and old-timey. There was an article posted to HN, where someone instrumented web apps and determined that after some short "warm-up" period, even variables in web apps written in dynamic languages had static types. If a tracing JIT eventually knows what type is in all the variables, why can't we have a development process that uses this information? Isolate all of the "dynamic" code in separate modules marked as such (the JIT could tell us what those sections are) and inject the type information back into the source code. Production servers could keep track of such information over many months, and the developers could know with a high degree of certainty what all the types in all of the variables are.
- Evbn 14y agoClosure Compiler for JS has optional typing.
- azakai 14y ago> How is coffeescript 'daring' in any way ? It is a thin veneer on top of javascript, syntactic sugar for your coffee. CoffeeScript does compile into JS, but so does Dart. Both are in that sense just syntactic sugar. CoffeeScript does make quite big changes to syntax though (often inspired by Ruby, Python, etc.) in many cases more than Dart which seems inspired by Java - and I don't think anyone considers Java 'inspiring' (useful and familiar, sure). > Dart is a hundred times more daring. It is trying to push optional typing. No mainstream language has such a feature, and not even so much non-mainstream ones. ActionScript.
- epidemian 14y ago> ActionScript. And Groovy =D
- Xcelerate 14y ago> CoffeeScript does compile into JS, but so does Dart. Both are in that sense just syntactic sugar. With regards to Dart, that's like saying C++ is just syntactic sugar for assembly. When there's semantic differences between the mapping from one programming domain to another, I would argue that constitutes "compilation". I would agree with the statement for CoffeeScript though.
- batgaijin 14y agoI don't understand, are you saying Dart doesn't compile to JS?
- benmanns 14y agoDart does compile to JS while CoffeeScript retains a one-to-one mapping between CoffeeScript and JavaScript. Read the "golden rule."[0] [0]: http://coffeescript.org/ http://coffeescript.org/
- azakai 14y agoThis is a matter of degree. Dart's types do not affect runtime behavior (at least in the compiled-JS route), so basic types are quite close to JavaScript's, much like CoffeeScript. There are also no features in Dart that cannot be compiled into JS, like say threading with shared state. So overall I think it is reasonable to say that both Dart and CoffeeScript are close to JavaScript and built specifically to compile into it.
- skybrian 14y agoFor the most part it's designed to be easy to compile to JavaScript, but there are bizarre exceptions like support for arbitrary precision integers. (I believe this is ignored by the Dart to JS compiler.)
- dantheman 14y agoI'm not fully informed about Dart's optional typing, but how is it different from ActionScript 3's optional type system?