Beta 3 released
Sunday, November 16, 2008 at 12:38PM Beta 3 has just been released, with a few minor bug fixes. Thanks for the feedback, everyone!
Olav |
Post a Comment |
Hi! This blog is for news, announcements and questions regarding the
Mascara ECMAScript 6 -> JavaScript translator.
See also:
The online demo
Download latest release
Contact:
olav@olav.dk
Disclaimer:
ECMAScript is a trademark of Ecma International.
Articles:
Sunday, November 16, 2008 at 12:38PM Beta 3 has just been released, with a few minor bug fixes. Thanks for the feedback, everyone!
Monday, November 10, 2008 at 06:04AM 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.