4 ms·
- Translating a statically-typed Object Oriented language to JS wouldn't produce hugely different (/horrific) code. From inheritance to lambdas, there are compa
by jeswin 14y ago
- Translating a statically-typed Object Oriented language to JS wouldn't produce hugely different (/horrific) code. From inheritance to lambdas, there are comparable features available in JS. Going from JS to C# might be harder though.
- It might be simpler to write JS, but I can imagine people wanting to see if type-safety has benefits.
- erik-kallen 14y agoThat's right, it doesn't get horrific until you use goto or yield (which don't exist in Javascript so they have to be emulated).
- TazeTSchnitzel 14y agoSome browsers, and ES Harmony, have yield. You could add a compiler switch to use native support, although only Firefox seems to support this just now. Curious to see how you managed the emulation - splitting up a function? Web workers? :)
- erik-kallen 14y agofor (;;), continue and switch.