3 ms·
In their definition of programming languages types, I'm not sure I see how SQL which they cateogrize as declarative really differs from FP, especially with lazy
by lindbergh 3y ago
In their definition of programming languages types, I'm not sure I see how SQL which they cateogrize as declarative really differs from FP, especially with lazy evaluation. Both are a succession of functions applied onto a previously declared variable : just think of a long SQL query with many ctes modifying the previous ones; each of them can be thought of as a variable which takes its value from the application of a function on other variable (a bit like the let function in ocaml).
I always thought of LaTeX as being the prime example of declarative programming.
- peterkelly 3y agoSQL does not support higher-order functions or lambdas (except possibly in some special dialect I'm not aware of)
- lindbergh 3y agoRight, good point. I just find the structure and the mindset to be similar.