Earlier quoted context omitted.
> I've been playing around with it a bit... Tell us more!
I'm afraid that there's not much to show yet, apart from some little prototype scribblings, and the basic idea: The web that we build for today is a rich, almost entirely backwards-compatible stew of nearly two decades of browser development and standards work, resulting in a triumvirate of very different languages that need to come together in order to make a web application happen: HTML + CSS + JS. Two of them are…
For modern development Javascript indeed is a shit language
131–140 of 243 posts
Re: For modern development Javascript indeed is a shit language
#132> They are not solvable by making a new ECMA spec. As it turns out, many of the issues outlined are not only very much solvable by making a new ECMA spec but either already solved in ES5 or solved in ES6. > JS has callable attributes > This is a shitty design decision I strongly recommend not following the provided link, which is basically inane, uses the term "slots" in a rather disturbing manner and makes completel…
ES6 has not been finished yet as far as I know.
> They are not solvable by making a new ECMA spec.
I consider using the upcoming ("new") ECMA spec more than fair game to refute his assertions.
[0] although a number of its features are shimable, precede it by a few years, are already (possibly partially) implemented in some runtimes or are available through ES6 -> ES5 compilation via Traceur. See http://kangax.github.io/es5-compat-table/es6/
Re: For modern development Javascript indeed is a shit language
#133Sadly I agree, you can just start with this: > [1,10,5,-15,-2,4].sort(); [-15,-2,1,10,4,5] And yes saying "oh but it is because it has weak types" doesn't excuse it, it is broken and that's that. Naming the brokeness with a label or showing why historically it is there, doesn't fix it. On the other hand they do have nice closure support, I do like some of that. But in large, the language makes me angry every time I h…
> [1,10,5,-15,-2,4].sort();
> [-15,-2,1,10,4,5]
[1,10,5,-15,-2,4].sort(function(a,b){return a-b})
[-15, -2, 1, 4, 5, 10]Re: For modern development Javascript indeed is a shit language
#134Sadly I agree, you can just start with this: > [1,10,5,-15,-2,4].sort(); [-15,-2,1,10,4,5] And yes saying "oh but it is because it has weak types" doesn't excuse it, it is broken and that's that. Naming the brokeness with a label or showing why historically it is there, doesn't fix it. On the other hand they do have nice closure support, I do like some of that. But in large, the language makes me angry every time I h…
[1,10,5,-15,-2,4].sort (a, b) -> a-b You're right; that was totally difficult.
Safari/Chrome: SyntaxError: Unexpected token '>'
Firefox: SyntaxError: syntax error
In a discussion about Javascript maybe it would be a good idea to give examples of Javascipt that actually run in a Javascript console?Re: For modern development Javascript indeed is a shit language
#135Earlier quoted context omitted.
What are other runtime options? - Flash? That's almost the same as JavaScript and it's getting obsolete. - Java? No one enables it on the client, thanks to security problems. - Asm.js/LLVM? These are immature and can't be used for production.
- GWT - Dart - ClojureScript
Re: For modern development Javascript indeed is a shit language
#136Earlier quoted context omitted.
CoffeeScript was obviously inspired by Ruby. While CS is great, I've never gotten over the usage of "->" or "=>" to signify a function. To me, Ruby's "def" or "do" reads so much better. Especially with "end", to signify a barrier, as opposed to whitespace. Have you considered porting Ruby directly to JavaScript? By the way, thanks for your work on _ & Backbone!
> Have you considered porting Ruby directly to JavaScript? It's been done. Check out Opal. I can't say I miss Ruby's ends in CS.
Re: For modern development Javascript indeed is a shit language
#137Earlier quoted context omitted.
CoffeeScript was obviously inspired by Ruby. While CS is great, I've never gotten over the usage of "->" or "=>" to signify a function. To me, Ruby's "def" or "do" reads so much better. Especially with "end", to signify a barrier, as opposed to whitespace. Have you considered porting Ruby directly to JavaScript? By the way, thanks for your work on _ & Backbone!
The arrow is standard mathematical notation for function definition
Re: For modern development Javascript indeed is a shit language
#138Earlier quoted context omitted.
> I've been playing around with it a bit... Tell us more!
I'm afraid that there's not much to show yet, apart from some little prototype scribblings, and the basic idea: The web that we build for today is a rich, almost entirely backwards-compatible stew of nearly two decades of browser development and standards work, resulting in a triumvirate of very different languages that need to come together in order to make a web application happen: HTML + CSS + JS. Two of them are…
Re: For modern development Javascript indeed is a shit language
#139Earlier quoted context omitted.
CoffeeScript was obviously inspired by Ruby. While CS is great, I've never gotten over the usage of "->" or "=>" to signify a function. To me, Ruby's "def" or "do" reads so much better. Especially with "end", to signify a barrier, as opposed to whitespace. Have you considered porting Ruby directly to JavaScript? By the way, thanks for your work on _ & Backbone!
> Especially with "end", to signify a barrier, as opposed to whitespace. But in any programming language you're already indenting blocks for humans. Why repeat the same work? Especially when it allows for inconsistency between how a human and how a machine would read the code.
Re: For modern development Javascript indeed is a shit language
#140Earlier quoted context omitted.
[1,10,5,-15,-2,4].sort (a, b) -> a-b You're right; that was totally difficult.
Safari/Chrome: SyntaxError: Unexpected token '>' Firefox: SyntaxError: syntax error In a discussion about Javascript maybe it would be a good idea to give examples of Javascipt that actually run in a Javascript console?
[1,10,5,-15,-2,4].sort ((a, b) => a-b).toString();
"-15,-2,1,4,5,10"