Hacker News new | ask | show | jobs
by mrkeen 1544 days ago
But it's a pain to write out assembly, so we go via LLVM and SSA.

In SSA, rather than modelling your program using 16 mutable registers (imperative folk love talking about "the real world" or "real computer"), we use an infinite number of immutable registers.

Infinite registers won't fit in a computer (we only have 16), and not being able to overwrite registers must kill performance right?

1 comments

I'm not sure what your point is. Yes, it is possible to build "functional" layers of abstraction on top of real hardware. The hardware itself is not "functional", that's why you need layers of abstraction.
The hardware is also not C style imperative. C/Haskell/Clojure/… are all abstractions that gets mapped to a very complicated extremely parallel hardware state machine. None of the main stream programming languages maps to real hardware. Which is a good thing! We want to use an abstraction that helps us getting the job done faster/better. It does not matter how much the abstraction you use maps to real hardware. As long as it gets the job done who cares?
> I'm not sure what your point is.

I'm pointing out that this is a terrible argument and needs to die: "It is not the way computers work at a hard­ware level"

> it is possible to build "functional" layers of abstraction on top of real hardware.

It's not just possible; I don't see any alternatives gaining traction anytime soon.