When you are calling a class of users 'normal', what does that make by extension the rest of the users? Surely you see this avenue is not productive.
If you (and others) insist on no variables, that's fine. Paralelism is a good argument (why then isn't openscad multi-threaded?). But then, as you and others pointed out, the problem is the hijacking of the word 'variable' and use in a context that strips a number of assumptions this word carries with it. Changing documentation and even syntax (maybe) would help eliminate the confussion.
Finally then, absent variables in the language (modelling language if not a programming one - a pedantic distinction at best), can everything be done? Can it easily and elegantly be done? We already see the frustration with lack of sum function. Sum can be added to the language, but it's not the only one. So when are you (and others) going to realize the need for iteration in certain cases (without hindering parallelism even)? And do refrain from calling it a disease, it's no more a disease than purely functional dogma. There are strengths and weaknesses in both approaches, surely they can coexist.
-------- Original message --------
From: Alan Cox alan@lxorguk.ukuu.org.uk
Date:03/02/2015 13:57 (GMT-05:00)
To: Adrian Grajdeanu adriang0@cox.net
Cc: OpenSCAD general discussion discuss@lists.openscad.org
Subject: Re: [OpenSCAD] A = A + 1;
On Tue, 03 Feb 2015 11:40:48 -0500
Adrian Grajdeanu adriang0@cox.net wrote:
You may beat this into me, but you will not squash most people's expectation. Hence you will have no peace.
Why is there this stubborness to cripple variables? Is there a technical reason, or is merely adherence to some purist dogma?
Technically it allows parallelism and a lot of optimisations because the
functions are all without side effects. Also because it's not a
programming language as such but a mathematical description of an object.
I can understand the tree structure of an openscad 'program'. Not only can i understand it, but appreciate it enormously. This paradigm simplifies things and enables caching of geometrical elements. However programers feel the need for variables (in the classical way).
That's why I called it 'iterative programmers disease'.
It's a peculiar worldview problem of programmers, and one that gets them
into a lot of trouble with parallelism, trying to do electronics or
write VHDL.
Programmers can use the python bindings and all the other ways of
interacting with OpenSCAD. Everyone on the other hand (including those
with a normal world view) can use OpenSCAD. Given the number of people
who 'get' openscad and its modelling who are not programmers I'd really
hate to see OpenSCAD lose that property.
The biggest problem I think is that the syntax and documentation of
OpenSCAD make it look like a variable to a programmer. It's very
misleading. Some of the other systems of similar nature do at least make
the difference explicit, or use constructs that make it more clear what
is going on (eg with x = [ 1, 2, 3, 4, 5] { blah } )
I'm not immune to it either - several of my tools write OpenSCAD files -
it's an output format for a program in C that computes models of model
railway coaches from a mix of inputs and an inbuilt understanding of how
they are assembled.
Alan