6 ms·
> if I cannot compile it straight to a machine code executable, I want nothing to do with it. Pretty much every modern implementation of every programming lang
by geocar 7y ago
> if I cannot compile it straight to a machine code executable, I want nothing to do with it.
Pretty much every modern implementation of every programming language has an intermediate representation -- GCC has one[1], LLVM has several [2,3], and unless you're programming in Forth (which notably generally doesn't have an intermediate representation), you're probably already happy with a language with an intermediate representation of some kind and just don't know enough to appreciate it.
The idea that "compile[d] straight to a machine code executable" is a line in the sand worth squat is just ignorant.
[1]: http://gcc.gnu.org/onlinedocs//gccint/RTL.html http://gcc.gnu.org/onlinedocs//gccint/RTL.html
[2]: https://llvm.org/docs/LangRef.html#type-system https://llvm.org/docs/LangRef.html#type-system
[3]: https://llvm.org/docs/BitCodeFormat.html https://llvm.org/docs/BitCodeFormat.html
- Annatar 7y agoPlease don't lecture me. I'm the component owner of GCC where I work, and that includes maintenance, debugging and patching. I am all too well aware of the intermediate represenation and that's fine when the end goal is executable machine code. What I don't need is lecturing, especially since I've taught many apprentices over the decades. When I need a lecture, I'll ask as I have in the past. I'm here to tell you how it's done and how it should be, not the other way around. Not everyone here is a "Hacker news".
- reitzensteinm 7y agoI'm sorry, but people with real expertise view everything as a complicated engineering trade off that's highly dependent on context. That you're willing to jump in and unilaterally declare a common strategy used by hordes of clever people as a Bad Idea pointing only to your years of experience as proof probably says more about you than it does about the merits of the technique in question.
- Annatar 7y agoI sure hope it says something about me. And just for the record, IT is this terrible cesspit of reinvented wheels by hordes, so yeah, hordes are not right. Never will be.
- IshKebab 7y agoCalm down, it wasn't a lecture. He was just pointing out that compilers nearly always have an IR.
- Annatar 7y agoI know that. It's been that way for years. His lecturing was really upsetting.
- chrisseaton 7y agoSo what do you propose instead of using an IR? No serious compiler for decades has been without an IR, going straight to machine code. Do you have some new idea? Or do you think we should go back to syntax-directed translation? I'm not sure that's tractable - performance would be terrible.
- Annatar 7y agoI think the two-pass assembler method is the way to go. With hand-crafted keyword to mnemonic translation tables.
- dang 7y agoI know how easily internet comments land on sensitive feelings—it happens to me every day—but this reply breaks the site guidelines. It takes the thread in an off-topic, unsubstantive direction, and it doesn't do what we ask here: "Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith." (https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html) Even though it felt like geocar was lecturing you, the stronger plausible and good-faith interpretation was to assume otherwise. In that case the discussion could have continued to exchange substantive information and readers could have learned more. Strangely enough a similar thing happened in an unrelated thread yesterday: https://news.ycombinator.com/item?id=20062560 https://news.ycombinator.com/item?id=20062560.