News for hackers. Stuff that matters.
Re:JavaScript is Dead. Long Live JavaScript by EGreg on Sunday June 26, 2011 @02:21PM (#2698639)
Why not just have a library in Javascript, for example:

  Q.each(arr, function(i) {
     this.rocks();
     arr.pop(); // watch out doing this in the loop
     arr.push('foo'); // watch out doing this in the loop
  });

  Q.each(obj, function(k) {
     this.rocks();
     delete obj[k]; // should be safe maybe
  });

  var p = Q.pipe(crazy stuff involving pipes and callbacks)
  doSql("SELECT * FROM users", p.fill('users'));

  getUsers = Q.getter(getUsers); // turns it into a really  smart getter

  getUsers = Q.batch(getUsers); // turns into into a batched getter
and lots of other stuff

Why must the language take care of everything for you when libraries can do it? That has been the case with C, C++ and other languages.

Re:JavaScript is Dead. Long Live JavaScript by petermichaux on Sunday June 26, 2011 @02:25PM (#2698653)
Features that can be added through libraries should be added that way. You cannot add new syntax which involves scoping of variables through libraries. How would you do destructuring assignments with a library and have it as succinct as it can be done with syntax?
Re:JavaScript is Dead. Long Live JavaScript by EGreg on Sunday June 26, 2011 @05:02PM (#2699067)
Yeah, some features can be pushed into the language, but I like languages which have few rules. Like C and like CHESS :)

My favorite languages are C, Java and Python though. So go figure...

Re:JavaScript is Dead. Long Live JavaScript by petermichaux on Sunday June 26, 2011 @05:11PM (#2699099)
If you like minimalistic languages, have you checked out Scheme? Because of its macros, the core language can stay small and the users can expand its syntax.