Lurker News
Back to discussion

Comment by spamtarget

spamtarget1 reply#
You are speak about things which called delegates, typed functions, defined by the parameters it gets, and the data it returns. Using delegates does not make a language functional. If you really want to speak about the underlying technology, than every high level language is declarative. You can draw a triangle by drawing three sides, or you can just put this in a function like drawtriangle(v1,v2,v3), and tadam, your language is declarative. The underlying tech is not important, the approach of the developer is important. See my longer answer above
yakshaving_jgt1 reply#
Your comments in this thread have made for a pretty tough read, but I think your angle is finally made clear here.

Supposedly, “every high level language is declarative”.
It’s an opinion I suppose, but I doubt it’s one you’re going to find much support for. What I think this feels like to most people is that things aren’t what people think they are because you’ve decided to reimagine the commonly used definitions of the words used to describe those things.
Not sure if it’s a straw man exactly, but I feel like I’m in a straw man’s garden.

spamtarget1 reply#
I'm sorry, i'm speaking with multiple people on multiple threads here, and don't have too much time to express myself perfectly. Every language is declarative is an interpretation that can make sense in certain angle, like when you use some imperative language, you create mini libraries for yourself, and that's already steps to a declarative variation, but this does not changes the fundamental design of the language.

But this is not my angle, i say the borders drawn up by the way how you, as a programmer, approach solving a problem. My take is declarative when you define the *end result* you want to get. You certainly don't do this with SQL, because that case the your product (what you write in the query) would be the end result set, the data itself. Of course in case of HTML you don't literally draw in the rectangle in the code, but you describe the end result. This is the difference.
Other arguments you wrote is out of scope for me regarding this conversation.

yakshaving_jgt3 replies#
That's quite the slippery slope though.

You don't literally draw a rectangle with HTML, but you also don't tell the database's query planner how to do its job.
You're also not comparing things on equal terms. HTML isn't any kind of programming or scripting language.
If I understand you correctly, SQL would only be declarative if the user literally wrote the entire result set of the query. This would then obviate the need for SQL. The result set of a query is called "data". It's not a declarative language.
You're free to redefine terms, but as I mentioned, you're going to have a hard time finding people to agree with you.

Continue this thread — 3 replies