News for hackers. Stuff that matters.
Re:Writing Your Own Programming Language by ufo on Thursday November 10, 2016 @10:28AM (#12921142)
It depends on hoe you are writing your compiler. If you are coding in a high level language, then writing an AST interpreter for a functional language is super simple. You just need to mix first-class functions and an unsurprising expression evaluator and you end up with something really expressive.

If you are targeting a lower level language like assembly language then I think an imperative language is easier to do though. You need to worry a lot about memory layouts, register allocation and calling conventions and in this paradigm a simple imperative language will be an easier fit.

Re:Writing Your Own Programming Language by DonaldFisk on Thursday November 10, 2016 @10:51AM (#12921394)
That's only because the hardware architecture's designed that way. If your target is a stack machine (with no general purpose registers), a functional language would be just as easy if not easier to generate code for.