Thread overview
DMDScript 1.14
Oct 05, 2007
Walter Bright
Oct 14, 2007
hax
Oct 25, 2007
Walter Bright
Nov 30, 2007
Dan
October 05, 2007
Closure bugs fixed

http://www.digitalmars.com/dscript/changelog.html
October 14, 2007
Cool. Closure seems work.

But there are still some bugs. Hope you could fix them in next release.

1. Not support multi-line string literal

var x = "a \
string";

assert (x == 'a string');

2. Can't call function expression directly

void function () {
	print('void function(){}()');
}();

(function () {
	print('(function(){})()');
})()

3. Not support function declaration in with statement
var x = 1;
with ({x:2}) {
  function f() { print(x) }
}

Yes, strictly speaking, it's a illegal code as spec, but most engines are tolerant
of it.
SpiderMonkey and KJS/JavaScriptCore will just treat it as var f = function(){...}
 This is my recommend behavior.
JScript and Opera will just treat it as normal function declaration and ignore the
with scope (f() will return 1).



October 25, 2007
Thanks for taking the time to prepare the very useful bug report.
November 30, 2007
Wow... with all these odd usages I'm sure you'll find a gazillion major bugs with my implementation when it's done.

Mine does a number of things internally that violate spec for performance and elegance reasons.

I've been talking to Brendan Eich (the original guy who "invented" JavaScript) about it and I've been trying to push him to just make one spurious 2.0 release to get the ball rolling.

I suggested we:
fix Date (use properties instead of get/set methods)
use ISO 8701 (that right?) Dates for Date.parse()
move eval, parseInt, parseFloat etc to String.prototype
upgrade to modern RegExp
allow functions without brackets if they're single-statement
make no semi-colon the default, but allow it as a statement
terminator.

Thoughts?