4 ms·
One of the most productive periods of my life was in the late 90s writing C++ code and being able to embed an optimized asm block in the middle of the code when
by zackmorris 8y ago
One of the most productive periods of my life was in the late 90s writing C++ code and being able to embed an optimized asm block in the middle of the code when high performance was needed for blitters (note the Output Operands and Input Operands sections):
https://wiki.osdev.org/Inline_Assembly https://wiki.osdev.org/Inline_Assembly
The power of this is that the compiler did the work of connecting variables from the two environments so we didn't have to write glue code.
There have been countless times where I've thought to myself "this would be trivial in another language". Can you write some kind of general purpose "embedder" that lets us use Javascript in C++, or PHP in Javascript even (PHP is simultaneously the best and worst language I've ever used). Maybe Swift or Kotlin or even Rust in Javascript. Stuff like that?
- lrenggli 8y agoYeah, had a similar experience with Turbo Pascal: it was a really cool to mix Pascal and assembler methods in the same file. Tools (debugger) were kind of broken though. In my thesis I propose to model the different languages as first-class elements that can be imported like a library and that do not only affect the compiler but also all other developer tools like syntax highlighting, formatters, auto-completion, debuggers, data viewers, etc.