Thread with 5 posts
jump to expanded post“c is portable assembly” hasn't been true since optimising compilers appeared for it. it's an accurate description for those really simple (usually old) c compilers on the other hand… where for (;;) and while (1) are different and local variables aren't free. old c is so cute
@hikari i wish there was a good portable language that has basic programming constructions to allow building a language on top without having to reimplement the wheel every time. Something like wasm could've been nice, but calling native code from wasm is a bit messy
@SRAZKVT yeah!! llvm ir is absurdly complicated (don't let someone tell you it's simple, i wish it were, i worked with it professionally and as a hobby for four years), and wasm is i think reasonably simple, but because it has memory sandboxing it's only good for compiling to… wasm
@hikari yeah llvm ir isn't exactly simple, honestly i almost like jvm instructions, they are reasonably simple to write out, but they are assumed to run in a vm, so that doesn't make it very suitable to be compiled to native. i kinda wish there was something in between wasm and jvm bytecode sometimes
@hikari and that can be compiled to native easily (though if it can also just run in a vm, i'm not against it, that would allow some nice things for debugging it)