2 ms·
"All essential state takes the form of relations This is a database" - relations are a more abstract concept than this, see relational programming "Logic is ex
by charlysl 9y ago
"All essential state takes the form of relations This is a database" - relations are a more abstract concept than this, see relational programming
"Logic is expressed using pure user-defined functions This is PHP / CGI / FastCGI. PHP is imperative, but the entire program is a pure function, because the request state is cleared between every request." - the entire program is not a pure function as seen by clients; to be functional, sending an identical request would always have to display the same information, but it won't if the page was updated between requests. Functional means that a given input (the request in this case) would always return the same output (page), just like a function in the mathematical sense would.
"PHP/MySQL is functional and relational." In a behavioural view of "functional", what matters is whether an operation always produces the same output for a given input; this is certainly possible with imperative languages, with some discipline. We can't apply a definitional view in this case, because PHP is multiparadign, supporting both stateful and functional programming , so you can't write operations that are functional by definition, you have to know what your are doing.
BTW, I haven't read the paper yet, I guess it will change my views after I do