Functional and imperative are the same thing. You only really do three things in programming. Ever. 1. Set a value. 2. Test a value. 3. Jump to an instruction that sets or tests a value. Noop doesn't count. I come from a lit background so I think in these terms: The declarative: this sets a value. It could be memory, registers, whatever. If you remember, back in the 1980's you would change what was on the monitor by simply writing directly to video memory using BASIC PUT. The inquisitive: this tests a value. If could be an if, for, or while statement. The imperative: go do something. Jump to another instruction. Everything is in the present tense. I've always kind of wondered how we could introduce the past and future tense into programming. To incorporate the past tense in to programming you would have to know the past states of objects to effectively use it. To incorporate the future tense you have to predict the states of objects. A past tense algorithm could help to predict trends of objects. Also, the modal verb "may" is interesting for statistical analysis. For example:
may i = 1;
Well, i may be 1, or it may not be one. Or...
may i = {1, 3, 5, 7, 9};
where i may be initialized to any of the values in the set. I think, if we also look at other language structures, we might come up compelling structures to use in describing algorithms. However, it still all comes back down to the basics of setting, testing, and jumping and you just can't get away from that.
m.bergman
For Bruce Schneier, quanta only have one state : afraid.
To succeed in the world it is not enough to be stupid, you must also be well-mannered. -- Voltaire
In most cases the only difference between disappointment and depression is your level of commitment. -- Marc Maron
I am not a chatbot