r/functionalprogramming • u/NebulaFast5180 • Nov 26 '24
Question Is functional assembly possible ?
Hello everyone, I am learning Haskell but I wanted to understand something :
When the Haskell script is compiled, it is translated into assembly, that is assembled into machine code, right ?
But the assembly language isn't functional, or even declarative, so your Haskell script isn't executed in a "functional way" in the end.
That is why I wanted to know if somebody ever created a functional version of the assembly language, or even if it's possible ?
Thank you in advance
10
Upvotes
View all comments
Show parent comment
2
u/slowly_examine Nov 27 '24
It's a common misconception but while LISP machines contained special hardware features like optimised garbage collection and tagged memory their instruction sets were still just normal imperative instructions.There have been some attempts at true functional hardware such as reducerons but none have ever seen real use.