3 ms·
You taking apart languages, saying this is imperative part and this is declarative. That does not make sense only entire languages can be described like that.
by spamtarget 4y ago
You taking apart languages, saying this is imperative part and this is declarative. That does not make sense only entire languages can be described like that.
But if you want:
In the recipe the ingredients can be "int y;", like declaration, or something else like malloc()
Stating that i will need something is not declarative programming. Declarative is defining the end result. So none of the ingredients or the declaration are declarative programming (if you want to turn recipe to declarative, you go to a restaurant), but as i told, you can't do this with elements of languages, it just does not make sense.
In practice language paradigms can overlap related to concrete products. You can use (and actually should) c# for functional programming, but that does not make the language functional, the fundamental design is imperative. In the future, everything will be declarative (chatgpt is the first glimpse), so in some way we're just wasting our time here. Also, speaking about AI, model training does not fit any of the current paradigms, it's gonna be a new one, and maybe the only one, who knows...