4 ms·
The TypeScript++ example looks like the type of code that JITs typically like. Python has Numba, where users affix a @jit annotation to functions to request tha
by mattgreenrocks 5y ago
The TypeScript++ example looks like the type of code that JITs typically like. Python has Numba, where users affix a @jit annotation to functions to request that. It works pretty well in my experience.
However, at this point, I'm mostly of the opinion that langs need some notion of mechanical sympathy if they want to be used for high-performance. JS engines probably have tens of millions of dollars of dev effort poured into them by now, yet they get soundly beaten by WASM, which is much younger. The conceptual foundation matters a lot.
That said, there's probably a nice space for an ergonomic, reasonably fast PL that sits between Rust and JS.
- isaacimagine 5y ago> JS engines probably have tens of millions of dollars of dev effort poured into them by now And JS engine JIT codegen modules are put to good use compiling wasm.
- janpaul123 5y agoGood points. I agree that choosing the abstractions wisely is key here.
- discreteevent 5y agoThat was the main motivation behind the inventors of dart. They got frustrated with all the hacks they had to put into V8 just because JavaScript was so mechanically unsympathetic. You can hardly blame then because they originally came from a background of developing smalltalk and self VMs.
- emteycz 5y agoIsn't JS much more Smalltalk-ish than Dart? I don't have much experience with Dart, but it always seemed like a very OOP language to me (and not in the "message passing" meaning).
- mattgreenrocks 5y agoThis is super interesting to me as a VM geek. I'd written off Dart as "Google's Swift" for the most part, but this makes a lot more sense. Thanks for the comment.
- notriddle 5y ago> That said, there's probably a nice space for an ergonomic, reasonably fast PL that sits between Rust and JS. Other than not running natively in web browsers, isn't that language called Ocaml?
- scns 5y agoIs it still possible to use the ReasonML syntax for native binaries?