Sunday
Nov162008

Beta 3 released

Beta 3 has just been released, with a few minor bug fixes. Thanks for the feedback, everyone!

Monday
Nov102008

Beta 2 released

First stupid bug found and fixed! The issue was with parameters sharing the same name, e.g.

function f(a, a) {}

This gave an obscure internal error. Now it is fixed so it gives a nice "Duplicate definition of name: a" error message instead :-) It is probably not a common situation, but there is one case where I have seen it happen. Consider if someone writes:

function f(int : a, int : b) {}

Do you see the error? The parameter type and parameter name are reversed, which is a typical beginners error for developers used to C-style syntax. In this case it would lead to the previously described internal error, which would be pretty confusing. Now at least it gives a meaningful error message.

Thinking aloud: This makes me wonder though, if there should be a warning if one shadows a built-in name? E.g if I create a variable or parameter named int or String? This is actually perfectly legal in ECMAScript, but I think that in almost all real-world cases it would be a bug.