Is G'MIC a imperative, declarative, or a functional language?

Taken from wikipedia:

Imperative  - Programs as statements that directly change computed state (datafields) 
Declarative  - Defines program logic, but not detailed control flow
Functional   - Treats computation as the evaluation of mathematical functions avoiding state and mutable data

I’m leaning to it being a functional language as it allows for treating strings as math parser code, or command. At the same time, it does have global variables, and structure. Seem to me that G’MIC is both a imperative, and a functional language.

This is where I got this from - Comparison of programming paradigms - Wikipedia

TL;DR: Functional.
Detail: “Programming paradigms” is a La Brea Tar Pit of fuzzy-bordered concepts designed, it seems, to get programmers’ Fruits-of-the-Loom all wound up in wads, thus embroiling them in endless — endless! — around-and-around parleys that never conclude, just exhaust. To make my case, look at the size of the “Programming Paradigms” list on the right hand size of the Wikipedia article you cite. Could it be that a lack of definition is leading to a large sprawl of conceptual bins? Evidence of such is further put forth in how some — most? — languages cited in the Examples manage to ramble over most of the Paradigm bins in the left-most column. Look how adventurous Python is? or C++? I profoundly, deeply, distrust analytic systems that appear incapable of classification. If I were still active in Wikipedia, I’d up-vote this to AfD. `Tis way more noise than signal.

There. I feel better now. I think I just got my Fruit-of-the-Loom up in a wad.

I puts me money on functional mainly in that @David_Tschumperle and friends almost never allow direct access to any kind of data structure; that’s fine with me. Thems where the bugs are.

1 Like

Imperative, in it’s overall context. A G’MIC program is a sequence of statements, executed in order from beginning to end.

1 Like