4 ms·
You can't just blankly state that functional programming is or isn't declarative. sort([42,7,2]) is declarative in that it declares what is wanted not how to do
by jVinc 8y ago
You can't just blankly state that functional programming is or isn't declarative. sort([42,7,2]) is declarative in that it declares what is wanted not how to do it. But if you write a functional bubble-sort, then that function is not a declaration of intent its a functional reimplementation of a method. Now naturally if your write a Haskel SQL parser/query planner and executor, then you can have a functional implementation of a program that executes a declarative language. And you could easily make a subset of haskel commands that declare your query in a functional manor then, instead of parsing SQL, and that subset, or DSL would be a declarative query language. That does not however make Haskel a declarative language overall.
Long story short, an orange isn't a weapon in general, but you can make it into one in specific cases.