News for hackers. Stuff that matters.
Re:Functional Python Programming by lindbergh on Friday June 09, 2023 @10:59AM (#36258831)
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.

Re:Functional Python Programming by peterkelly on Friday June 09, 2023 @11:03AM (#36258900)
SQL does not support higher-order functions or lambdas (except possibly in some special dialect I'm not aware of)
Re:Functional Python Programming by lindbergh on Friday June 09, 2023 @11:13AM (#36259050)
Right, good point. I just find the structure and the mindset to be similar.