Hacker News new | past | comments | ask | show | jobs | submit login

Well any turing complete language is suitable for compiler development work, but yeah Clojure is designed around symbolic computation, recursion and things like that.



Can we stop pulling out this turing complete quip?

That's like asking on a cooking forum how to open a coconut, and the reply being well any physical object with mass can technically open a coconut with the correct application of force, but yeah, you should probably use a machete.


BTW, the guy you replied to is part of the team working on what is probably the most advanced compiler technology breakthrough in the last decade (Truffle/Graal). So he's not "technically right", but has actually contributed to the world's most revolutionary compiler (which is written neither in Haskell nor a Lisp).


I was replying to what he said, not who he is.


I think that's relevant context which proves that your analogy in this particular case is inappropriate. He's a chef working in one of the world's greatest restaurants and he's not using a machete to open the coconut. Therefore, there are probably good reasons to prefer another tool and the advantages of a machete are probably not that big (or are offset by other factors). Again -- in this particular case.

So while the "any Turing complete language" is an over-generalization, so is "use the right tool for the job". Programming languages are not at all like knives or hammers as they are 1/ terribly expensive 2/ require constant training 3/ require specialization and 4/ each designed to be general-purpose. It's more productive to use just one language you know best than keep switching to a completely different one that's marginally better at the particular task at hand.


I was trying to challenge the idea that there is anything magic about compilers. Some people think they do magic things that they could never understand, but the reality all the techniques could be implemented in VB6 if you wanted. You don't need a server, a database driver, middleware or whatever. If your language can read from somewhere and write to somewhere that's all you need. That's what makes compilers perfect little programs in my mind.


I'm using this one, thanks!


Btw., you do not need a Turing-complete language to build a compiler. It is much better to use a non-Turing-complete one, ideally, a total language.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: