2012/2/11 Mark Hahn <[email protected]>: >> In my mind, just because cs semantics are *compatible* with js semantics >> doesn't mean they are "the same". > > It's a matter of degree. Most of CS maps directly into JS keeping the exact > same semantics even though the syntax is wildly different. The best example > is -> of course. Scope assignment does have different semantics, but even > that is quite mild.
Hmm... I wouldn't really say that. For example, there are loop expressions and autoreturn. Also, the body of a "class" has some magic. > The big difference in my mind is that I can think of what the resulting JS > will be almost perfectly when I read or write CS. My mind isn't good enough > to do that with streamline. Hmm... I don't think that it's necessary to do that in either of those languages. IMO, having to think about what the generated JS is or having to look at it (e.g. for debugging) is a major bug, just like having to look at the generated machine code that gcc creates from C++ code is a bug, too. (That's also why line number mapping for coffeescript is being worked on, it's basically complete, just without tests and with a bug that makes it not work correctly inside of string interpolation. https://github.com/jashkenas/coffee-script/pull/2050 ) You only have to know what the code will do, not what it will look like. And that usually is a lot easier. I can't tell you how streamline works, but I grasped the basic concept "underscore is like a blocking call that resumes on callback", and I think that this should be sufficient. Are you going to say gcc is bad because it optimizes code in ways you don't know or understand? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
