News for hackers. Stuff that matters.
Re:ECMAScript 6 looks promising by hsuresh on Thursday November 24, 2011 @12:55PM (#3274952)
I doubt. /* */ is already used for commenting.
Re:ECMAScript 6 looks promising by MrHamdulay on Thursday November 24, 2011 @01:07PM (#3274987)
That's the idea. Python uses the same syntax for multi-line strings as for comments.
Re:ECMAScript 6 looks promising by kbd on Thursday November 24, 2011 @01:44PM (#3275081)
This is completely wrong. Triple quotes in Python indicate a string. It happens to be able to be used for a multi-line comment because it officially leaves no artifact in the AST if it's not assigned to anything (can't find the documentation for this atm).

/ * ... * / is a comment in Javascript. Changing it to mean multi-line string is a terrible idea.

This list of changes to Javascript borrows so much from Python I'm surprised they didn't also borrow Python's multi-line string syntax.

Re:ECMAScript 6 looks promising by masklinn on Thursday November 24, 2011 @03:08PM (#3275298)
> Python uses the same syntax for multi-line strings as for comments.

No it does not. Triple-quoted strings are still strings, all comments in Python are prefixed with `#`.

There are two situations where triple quoted strings are used as "comments":

* Multiline comments for lazy people, as Python has no multiline comment syntax

* docstrings. As the name indicate, they're strings, they're not comments and should not be confused by more ad-hoc systems such as javadoc comments. Python lets you write `help(name)` and get the docstring associated with the object

Re:ECMAScript 6 looks promising by morsch on Thursday November 24, 2011 @08:22PM (#3275893)
Damn, I just got comfortable with functions being first class constructs, now I have to get used to the idea of comment meta-programming.