Live data from Hacker News

What's wrong with JavaScript

rdallasgray.github.io

11–20 of 43 posts

Re: What's wrong with JavaScript

#11
post #7

Earlier quoted context omitted.

I just checked my small project, and it has 111 this. and about 300 lines with plentiful whitespace. This made me think how much better would it be if it used just single dot for referencing this. Like .property

I don't know if you've toyed around with CoffeeScript before, but that's something it adds in (you can use the Ruby-esque '@property' instead of 'this.property')

I had, but I abandoned it for reasons I cannot recall right now. Maybe because I like to go bare metal every time possible. But maybe I should give it a try...

Re: What's wrong with JavaScript

#13
Dart fixes all of JavaScript's "WAT" quirks. There is proper lexical scoping, a lexically scoped `this`, no type coercion, no monkey-patching, and so forth. It also has a "method_missing" thing called "noSuchMethod".

But most importantly: It scales.

Structure is declared and not imperatively constructed. Your tools can tell what's going on without actually running the code.

Re: What's wrong with JavaScript

#14
post #8

I'd rather have a fixed JS (no BS coercion, actual hashes, method_missing, better binding rules, local vars by default, "use scrict" checks for everything, int64 arithmetic, and a non manual ad-hoc way to create prototype chains) as the next version, instead of the "backwards compatible" pile-on that the upcoming version is. Such a JS would enable them to reuse large parts (or the entirety) of the current interpreter…

I politely submit that what you actually want is Python, Ruby, or Lua in the browser.

Re: What's wrong with JavaScript

#18
post #8

I'd rather have a fixed JS (no BS coercion, actual hashes, method_missing, better binding rules, local vars by default, "use scrict" checks for everything, int64 arithmetic, and a non manual ad-hoc way to create prototype chains) as the next version, instead of the "backwards compatible" pile-on that the upcoming version is. Such a JS would enable them to reuse large parts (or the entirety) of the current interpreter…

I politely submit that what you actually want is Python, Ruby, or Lua in the browser.

Haven't we had python in the browser for a while now with pythonwebkit, pywebkitgtk, and the other webkit-native-DOM python bindings?

Re: What's wrong with JavaScript

#19
post #11

Earlier quoted context omitted.

I don't know if you've toyed around with CoffeeScript before, but that's something it adds in (you can use the Ruby-esque '@property' instead of 'this.property')

I had, but I abandoned it for reasons I cannot recall right now. Maybe because I like to go bare metal every time possible. But maybe I should give it a try...

http://js2coffee.org/ has really helped me in making the transition.

Re: What's wrong with JavaScript

#20
post #12

And yet nobody seems to be interested in Dart.

Dart VM will never be in IE , Firefox or Safari. What's the point of Dart ? to compile down to javascript? if i had to work with an alternative to JS i would chose haxe instead of Dart , since it is compatible with some parts of javascript and one can use the DOM api directly. Dart is great in theory but has little future.
Post reply on HN