I think that a functional program, compiled to native code is STILL a functional program. You seem to not think that. Edit: If so, why?
Edit 2: Oh, maybe your point is that FP is statically typed?
I think that a functional program, compiled to native code is STILL a functional program. You seem to not think that. Edit: If so, why?
Edit 2: Oh, maybe your point is that FP is statically typed?
It's now all about global variables (memory, stack and registers) and side effects. How is that functional?
Well, you can think of it as functional, if you consider every machine instruction to be function (whole machine state->whole machine state), but it's not practical and nobody really thinks about machine code like that. And anyway - if you want to think about it like that - evey imperative program becomes functional :)
But I suspect (not entirely sure, but suspect) that if you apply sufficient discipline, and omit from the equation the global necessities of registers, you can probably create functions in assembly, and call them in a functional way. In fact I suspect if this were not possible, then FP languages would not be possible to create.
But FP in ASM sounds really really painful.