3 ms·
I am not sure what can be gained by comparing human languages or speech to computer language paradigms. I mean I could easily encode "go get a cup, and I'll ge
by lacampbell 10y ago
I am not sure what can be gained by comparing human languages or speech to computer language paradigms. I mean I could easily encode
"go get a cup, and I'll get you water." as (ocamlish/F#ish)
get_a_cup |> Option.map(fill_with_water)
- taeric 10y agoMy assertion is that people are more comfortable with imperative programming, because we are learning imperative thinking from a very early age. That is, there is no intrinsic advantage to imperative, by my assertion. Just that it is something we are much more comfortable with from experience.
- lacampbell 10y agoWhat I am trying to get in as I am not sure that this kind of thinking/speech is inherently imperative or declarative in (in the computing sense). The idea of modifying and controlling bits of state which other processes depend is fairly novel to the novice programmer, isn't it? I'm sure it tripped me up a lot.
- taeric 10y agoI'm not sure I follow. Imperative/Declarative in the programming sense is no different from the speech sense, is it? Quickly skimming the wikipedia page [1] for imperative mood makes it look similar enough to me. The page for imperative programming [2] references the grammar page, even. As for the state, I think in life everything has state. Kids are quickly learning which ones have states that they care about. It is not uncommon to see them learn that cups filled with water need to be held a certain way, otherwise they spill. Now, like more formalisms, computing and programming is much more strict. But that is a matter of rigor, moreso than of form. That is, it is the same form, just not forgiving in syntax/content. Though, seriously, if I am abusing terms here please let me know. Is not my intent. [1] https://en.wikipedia.org/wiki/Imperative_mood https://en.wikipedia.org/wiki/Imperative_mood [2] https://en.wikipedia.org/wiki/Imperative_programming https://en.wikipedia.org/wiki/Imperative_programming