|
|
|
|
|
by cryptonector
1513 days ago
|
|
Haskell's effectful operations are functions. Oh sure, not in the mathematical sense unless you model them as functions from World -> World. > Every program in any language that is compiled compiles down to a constant ... Sigh, yes, the compiled program is constant, but you know what I meant: a constant value, such as a number, that the program is expected to output. Let's not be this pedantic. |
|
No, they aren't.
> Oh sure, not in the mathematical sense unless you model them as functions from World -> World.
Also, not in the syntactical sense.
They are “functions” in that “in certain other programming languages, the closest thing to something filling the same role are called ’functions’.”
But it's rather important to the way Haskell works that they are a different thing that operate at a logically different time, than functions.
> Sigh, yes, the compiled program is constant, but you know what I meant
Yes, you meant reduction, not compilation, and you meant non-function, not just constant, but Haskell programs do reduce to non-function constants.