News for hackers. Stuff that matters.
Re:Ask HN: How do you test SQL? by indymike on Wednesday February 01, 2023 @02:56PM (#34616638)
Further, another way to look at it is, declarative languages specify output, imperative languages focus on the steps to generate outputs. In imperative code, I'm worrying about how instead of what. In declarative code, I'm worried about what instead of how. As in all things, neither of these statements will be absolutes - there are situations and times where a declarative language user will worry about how the query planner will execute, and there are times where an imperative language user will write very much declarative code.
Re:Ask HN: How do you test SQL? by spamtarget on Wednesday February 01, 2023 @08:07PM (#34620627)
>neither of these statements will be absolutes - there are situations and times where a declarative language user will worry about how the query planner will execute, and there are times where an imperative language user will write very much declarative code.

That's right, in practice everything is more like a mishmash of everything. Your function library could be seen as a declarative language over the top of a generic language.

Re:Ask HN: How do you test SQL? by indymike on Friday February 03, 2023 @03:47PM (#34647514)
> That's right, in practice everything is more like a mishmash of everything.

I agree, and will die on this hill :-)