Re:Node.js: Some quick optimization advice
by spullara on Tuesday October 13, 2015 @12:30PM
(#10381556)
People literally toString functions and parse them to implement features. Those features depend on there being comment text in the function that they parse. Pretty much a terrible hack but it is true that you can't remove the comments without breaking current code.
[ Parent
| on HN ]
Re:Node.js: Some quick optimization advice
by alkonaut on Tuesday October 13, 2015 @02:10PM
(#10382312)
Wow. That's just something that should be an obvious fix in a future ES. Not only does it hurt the optimizer, it also seems to imply that the content of comments sometimes has semantic meaning in the code, such as people having invented directives etc.
Surely this must be undocumented features of the language spec?