3 ms·
Actually they do perform (drastically cutailed) computation; for example INI performs computations of the form: [foo] # section = "foo" bar=baz # table
by a1369209993 6y ago
Actually they do perform (drastically cutailed) computation; for example INI performs computations of the form:
[foo] # section = "foo"
bar=baz # table[section]["bar"] = "baz"
Similarly, wc is a programming language with ~4 operations:
'a' # inc byte counter, add word flag to word counter, clear word flag
# any other non-space/newline is the same as 'a'
' ' # inc byte counter, mark word flag
\n # inc byte counter, mark word flag, inc line counter
EOF # (implied) print counters
That set of operations is of extremely limited usefulness, but that's more or less true of any non-turing-complete language (and many that are turing-complete, even).
- deleted 6y ago[deleted]
- goto11 6y agoINI does not perform any computations, it is a file format without any execution model defined. What you describe is a possible execution model by an INI parser, but an INI parser is not required to do that.
- baq 6y agothis point is dangerous - the same logic can be applied to C code or any other programming language. source files only encode the AST, after all. it's the compiler/interpreter doing the actual work. it just so happens that the INI interpreter doesn't usually do much else than load the list of key value maps - and that's the problem - people extend INI source files in a different language which can do more.
- goto11 6y agoNo, a programming language like C have both a syntax and an execution model. In Turing-machine terminology, it has a set of symbols and rules for processing the symbols. This is why you can reason about things like the halting-problem. If you only have a set of symbols but no rules for processing the symbols, you don't have a machine, and you cant meaningfully talk about "termination". INI does not have a defined execution model, so it is not a machine the way C is. A particular implementation could read the data into key-value maps but it is not required to. E.g. it could just search through the file for a specific key. Or it could do nothing.