Live data from Hacker News

Sweet.js - Sweeten your Javascript (by Mozilla)

github.com

1–10 of 30 posts

Re: Sweet.js - Sweeten your Javascript (by Mozilla)

#4
Not a ‘new JS’ with ‘better’ syntax, but convenient means for developers to define their own JS with the syntax most suitable for the problem at hand. Reminded me of “You're solving the wrong problem” post[0].

For good or bad, it appears to be limited, with macros you probably can't, for example, make curly braces optional.

[0] http://news.ycombinator.com/item?id=3561397

Re: Sweet.js - Sweeten your Javascript (by Mozilla)

#6
post #3

If I recall correctly, there might be a macro system in the ECMAScript 6 specification (which should be implemented natively by Javascript engines eventually).

That not correct -- no new features are being added to ES6 now. Macros are possible for subsequent versions, though.

Re: Sweet.js - Sweeten your Javascript (by Mozilla)

#8
post #6
post #3

If I recall correctly, there might be a macro system in the ECMAScript 6 specification (which should be implemented natively by Javascript engines eventually).

That not correct -- no new features are being added to ES6 now. Macros are possible for subsequent versions, though.

Ah ok, I think I first heard of it here and thought it would be included in the spec: http://brendaneich.github.com/Strange-Loop-2012/#/41

Re: Sweet.js - Sweeten your Javascript (by Mozilla)

#9
Reading about Sweet.js made me really, really want such a thing in Python.

I recognise that such a thing would run completely counter to Python's 'no magic' cultural values, but structural search-and-replace seems such an intoxicatingly powerful tool, I'd like to at least have the option to abuse it.

Post reply on HN