discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

What to call "variables"

LB
L Boyd
Tue, Aug 30, 2016 12:09 PM

I see multiple question from those new to OpenSCAD about what we call
variables. They are confused because they are different from the variables
used in many programming languages. They don't understand why the can't do
a=a+1.

They are not really constants either, because they can be overridden locally
within inner scopes.

Perhaps we should use an unfamiliar name, so that they have to read the
definition for how to use them.

I don't have any suggestions, but we need to discuss this before changing
the manual.


Larry

View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I see multiple question from those new to OpenSCAD about what we call variables. They are confused because they are different from the variables used in many programming languages. They don't understand why the can't do a=a+1. They are not really constants either, because they can be overridden locally within inner scopes. Perhaps we should use an unfamiliar name, so that they have to read the definition for how to use them. I don't have any suggestions, but we need to discuss this before changing the manual. ----- Larry -- View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260.html Sent from the OpenSCAD mailing list archive at Nabble.com.
AC
Alan Cox
Tue, Aug 30, 2016 12:31 PM

On Tue, 30 Aug 2016 05:09:39 -0700 (MST)
L Boyd lboyd@frontiernet.net wrote:

I see multiple question from those new to OpenSCAD about what we call
variables. They are confused because they are different from the variables
used in many programming languages. They don't understand why the can't do
a=a+1.

They are not really constants either, because they can be overridden locally
within inner scopes.

Perhaps we should use an unfamiliar name, so that they have to read the
definition for how to use them.

I don't have any suggestions, but we need to discuss this before changing
the manual.

They are constants but they are scoped. No different to C

const x = 1

static void foo(void)
{
const x = 4;

blah;

}

Or perhaps think of them as functions or macros, they are really just an
expansion.

Alan

On Tue, 30 Aug 2016 05:09:39 -0700 (MST) L Boyd <lboyd@frontiernet.net> wrote: > I see multiple question from those new to OpenSCAD about what we call > variables. They are confused because they are different from the variables > used in many programming languages. They don't understand why the can't do > a=a+1. > > They are not really constants either, because they can be overridden locally > within inner scopes. > > Perhaps we should use an unfamiliar name, so that they have to read the > definition for how to use them. > > I don't have any suggestions, but we need to discuss this before changing > the manual. They are constants but they are scoped. No different to C const x = 1 static void foo(void) { const x = 4; blah; } Or perhaps think of them as functions or macros, they are really just an expansion. Alan
LB
L Boyd
Tue, Aug 30, 2016 3:31 PM

Alan Cox wrote

On Tue, 30 Aug 2016 05:09:39 -0700 (MST)
L Boyd <

lboyd@

> wrote:

I see multiple question from those new to OpenSCAD about what we call
variables. They are confused because they are different from the
variables
used in many programming languages. They don't understand why the can't
do
a=a+1.

They are not really constants either, because they can be overridden
locally
within inner scopes.

Perhaps we should use an unfamiliar name, so that they have to read the
definition for how to use them.

I don't have any suggestions, but we need to discuss this before changing
the manual.

They are constants but they are scoped. No different to C

const x = 1

static void foo(void)
{
const x = 4;

blah;

}

Or perhaps think of them as functions or macros, they are really just an
expansion.

Alan

True, but they are also more

for (a =[3:5])echo(a);    // 3 4 5

The question is what word should be used in the manual.


OpenSCAD mailing list

Discuss@.openscad


Larry

View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18262.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Alan Cox wrote > On Tue, 30 Aug 2016 05:09:39 -0700 (MST) > L Boyd &lt; > lboyd@ > &gt; wrote: > >> I see multiple question from those new to OpenSCAD about what we call >> variables. They are confused because they are different from the >> variables >> used in many programming languages. They don't understand why the can't >> do >> a=a+1. >> >> They are not really constants either, because they can be overridden >> locally >> within inner scopes. >> >> Perhaps we should use an unfamiliar name, so that they have to read the >> definition for how to use them. >> >> I don't have any suggestions, but we need to discuss this before changing >> the manual. > > They are constants but they are scoped. No different to C > > const x = 1 > > static void foo(void) > { > const x = 4; > > blah; > } > > > > Or perhaps think of them as functions or macros, they are really just an > expansion. > > Alan > > True, but they are also more > > for (a =[3:5])echo(a); // 3 4 5 > > The question is what word should be used in the manual. > _______________________________________________ > OpenSCAD mailing list > Discuss@.openscad > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org ----- Larry -- View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18262.html Sent from the OpenSCAD mailing list archive at Nabble.com.
FV
Frank van der Hulst
Tue, Aug 30, 2016 6:18 PM

Why NOT make them behave like variables in other languages and allow a = a

  • 1 ?

On Wed, Aug 31, 2016 at 12:09 AM, L Boyd lboyd@frontiernet.net wrote:

I see multiple question from those new to OpenSCAD about what we call
variables. They are confused because they are different from the variables
used in many programming languages. They don't understand why the can't do
a=a+1.

They are not really constants either, because they can be overridden
locally
within inner scopes.

Perhaps we should use an unfamiliar name, so that they have to read the
definition for how to use them.

I don't have any suggestions, but we need to discuss this before changing
the manual.


Larry

View this message in context: http://forum.openscad.org/
What-to-call-variables-tp18260.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Why NOT make them behave like variables in other languages and allow a = a + 1 ? On Wed, Aug 31, 2016 at 12:09 AM, L Boyd <lboyd@frontiernet.net> wrote: > I see multiple question from those new to OpenSCAD about what we call > variables. They are confused because they are different from the variables > used in many programming languages. They don't understand why the can't do > a=a+1. > > They are not really constants either, because they can be overridden > locally > within inner scopes. > > Perhaps we should use an unfamiliar name, so that they have to read the > definition for how to use them. > > I don't have any suggestions, but we need to discuss this before changing > the manual. > > > > ----- > Larry > -- > View this message in context: http://forum.openscad.org/ > What-to-call-variables-tp18260.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
DS
Dan Shriver
Tue, Aug 30, 2016 6:22 PM

"Constants within a scope"?

That would describe them.
On Aug 30, 2016 8:10 AM, "L Boyd" lboyd@frontiernet.net wrote:

I see multiple question from those new to OpenSCAD about what we call
variables. They are confused because they are different from the variables
used in many programming languages. They don't understand why the can't do
a=a+1.

They are not really constants either, because they can be overridden
locally
within inner scopes.

Perhaps we should use an unfamiliar name, so that they have to read the
definition for how to use them.

I don't have any suggestions, but we need to discuss this before changing
the manual.


Larry

View this message in context: http://forum.openscad.org/
What-to-call-variables-tp18260.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

"Constants within a scope"? That would describe them. On Aug 30, 2016 8:10 AM, "L Boyd" <lboyd@frontiernet.net> wrote: > I see multiple question from those new to OpenSCAD about what we call > variables. They are confused because they are different from the variables > used in many programming languages. They don't understand why the can't do > a=a+1. > > They are not really constants either, because they can be overridden > locally > within inner scopes. > > Perhaps we should use an unfamiliar name, so that they have to read the > definition for how to use them. > > I don't have any suggestions, but we need to discuss this before changing > the manual. > > > > ----- > Larry > -- > View this message in context: http://forum.openscad.org/ > What-to-call-variables-tp18260.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
MD
Michele Denber
Tue, Aug 30, 2016 6:23 PM

On 08-30-2016 2:18 PM, Frank van der Hulst wrote:

Why NOT make them behave like variables in other languages and allow a
= a + 1 ?

I second that.

         - Michele
On 08-30-2016 2:18 PM, Frank van der Hulst wrote: > Why NOT make them behave like variables in other languages and allow a > = a + 1 ? I second that. - Michele
R
Ronaldo
Tue, Aug 30, 2016 7:06 PM

Why NOT make them behave like variables in other languages and allow a = a

  • 1 ?

Because there is no assignment in OpenSCAD. When you write:

  a = 10;

in OpenSCAD, this is a definition, like in math, not an assignment.
Assignments are the cause of many misleading code and many languages
restrict their effects. Functional programming languages have no variables
neither assignments. We don't need them.

--
View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18266.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

> Why NOT make them behave like variables in other languages and allow a = a > + 1 ? Because there is no assignment in OpenSCAD. When you write: > a = 10; in OpenSCAD, this is a definition, like in math, not an assignment. Assignments are the cause of many misleading code and many languages restrict their effects. Functional programming languages have no variables neither assignments. We don't need them. -- View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18266.html Sent from the OpenSCAD mailing list archive at Nabble.com.
JD
Jerry Davis
Tue, Aug 30, 2016 7:28 PM

On Tue, Aug 30, 2016 at 12:06 PM, Ronaldo rcmpersiano@gmail.com wrote:

Why NOT make them behave like variables in other languages and allow a =

a

  • 1 ?

Because there is no assignment in OpenSCAD. When you write:

  a = 10;

in OpenSCAD, this is a definition, like in math, not an assignment.
Assignments are the cause of many misleading code and many languages
restrict their effects. Functional programming languages have no variables
neither assignments. We don't need them.

excuse me? There are assignments in Functional programming languages.
And yes, we really could use them. Functional programming languages in
simple terms make a
difference between where the variable (in memory) is, and the value that
points
to it.

So, why have true variables only in certain circumstances (like for loops,
arguments in module calls, functions, etc), and not in others.
If a value could be assigned to a "variable" at any time, then the
controversy would just go away.

Jerry

--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov

On Tue, Aug 30, 2016 at 12:06 PM, Ronaldo <rcmpersiano@gmail.com> wrote: > > Why NOT make them behave like variables in other languages and allow a = > a > > + 1 ? > > Because there is no assignment in OpenSCAD. When you write: > > > a = 10; > > in OpenSCAD, this is a definition, like in math, not an assignment. > Assignments are the cause of many misleading code and many languages > restrict their effects. Functional programming languages have no variables > neither assignments. We don't need them. excuse me? There are assignments in Functional programming languages. And yes, we really could use them. Functional programming languages in simple terms make a difference between where the variable (in memory) is, and the value that points to it. So, why have true variables only in certain circumstances (like for loops, arguments in module calls, functions, etc), and not in others. If a value could be assigned to a "variable" at any time, then the controversy would just go away. Jerry -- Extra Ham Operator: K7AZJ Registered Linux User: 275424 Raspberry Pi and Openscad developer *The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".*- Isaac. Asimov
DM
doug moen
Tue, Aug 30, 2016 8:14 PM

OpenSCAD is a mathematical notation for describing geometric shapes. It's
not a general purpose programming language.

OpenSCAD's use of the term "variable" is consistent with the meaning of
"variable" in mathematics, and in pure functional programming languages.
The word "variable" in mathematics and formal logic has a distinguished
history going back hundreds of years, and I don't think there's a problem
using that word with its traditional meaning.

The terminology I'd get rid of instead is "assignment statement". I
consider x = 1; to be a "definition" of x. It's a mathematical equation
that defines the meaning of x within its scope. The underlying
mathematical reason that x = x + 1; is invalid is because this is not a
valid equation defining x. There is no number x that is equal to itself
plus 1.

On 30 August 2016 at 08:09, L Boyd lboyd@frontiernet.net wrote:

I see multiple question from those new to OpenSCAD about what we call
variables. They are confused because they are different from the variables
used in many programming languages. They don't understand why the can't do
a=a+1.

They are not really constants either, because they can be overridden
locally
within inner scopes.

Perhaps we should use an unfamiliar name, so that they have to read the
definition for how to use them.

I don't have any suggestions, but we need to discuss this before changing
the manual.


Larry

View this message in context: http://forum.openscad.org/
What-to-call-variables-tp18260.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

OpenSCAD is a mathematical notation for describing geometric shapes. It's not a general purpose programming language. OpenSCAD's use of the term "variable" is consistent with the meaning of "variable" in mathematics, and in pure functional programming languages. The word "variable" in mathematics and formal logic has a distinguished history going back hundreds of years, and I don't think there's a problem using that word with its traditional meaning. The terminology I'd get rid of instead is "assignment statement". I consider `x = 1;` to be a "definition" of `x`. It's a mathematical equation that defines the meaning of `x` within its scope. The underlying mathematical reason that `x = x + 1;` is invalid is because this is not a valid equation defining `x`. There is no number `x` that is equal to itself plus 1. On 30 August 2016 at 08:09, L Boyd <lboyd@frontiernet.net> wrote: > I see multiple question from those new to OpenSCAD about what we call > variables. They are confused because they are different from the variables > used in many programming languages. They don't understand why the can't do > a=a+1. > > They are not really constants either, because they can be overridden > locally > within inner scopes. > > Perhaps we should use an unfamiliar name, so that they have to read the > definition for how to use them. > > I don't have any suggestions, but we need to discuss this before changing > the manual. > > > > ----- > Larry > -- > View this message in context: http://forum.openscad.org/ > What-to-call-variables-tp18260.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > >
DW
Don Wooton
Tue, Aug 30, 2016 8:31 PM

How about having a warning message something like
WARNING Value reassigned: line 6
and a preferences to turn this one warning off.  If the warning
is on by default, it may cause the new user to notice that this
procedure is not expected and to look in the manual.

- Don

On Aug 30, doug moen propounded certain bytes, to wit:

Subject: Re: [OpenSCAD] What to call "variables"

OpenSCAD is a mathematical notation for describing geometric shapes. It's
not a general purpose programming language.

OpenSCAD's use of the term "variable" is consistent with the meaning of
"variable" in mathematics, and in pure functional programming languages.
The word "variable" in mathematics and formal logic has a distinguished
history going back hundreds of years, and I don't think there's a problem
using that word with its traditional meaning.

The terminology I'd get rid of instead is "assignment statement". I
consider x = 1; to be a "definition" of x. It's a mathematical equation
that defines the meaning of x within its scope. The underlying
mathematical reason that x = x + 1; is invalid is because this is not a
valid equation defining x. There is no number x that is equal to itself
plus 1.

On 30 August 2016 at 08:09, L Boyd lboyd@frontiernet.net wrote:

I see multiple question from those new to OpenSCAD about what we call
variables. They are confused because they are different from the variables
used in many programming languages. They don't understand why the can't do
a=a+1.

They are not really constants either, because they can be overridden
locally
within inner scopes.

Perhaps we should use an unfamiliar name, so that they have to read the
definition for how to use them.

I don't have any suggestions, but we need to discuss this before changing
the manual.


Larry

View this message in context: http://forum.openscad.org/
What-to-call-variables-tp18260.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

-- End of excerpt from doug moen'

How about having a warning message something like WARNING Value reassigned: line 6 and a preferences to turn this one warning off. If the warning is on by default, it may cause the new user to notice that this procedure is not expected and to look in the manual. - Don On Aug 30, doug moen propounded certain bytes, to wit: > Subject: Re: [OpenSCAD] What to call "variables" > > OpenSCAD is a mathematical notation for describing geometric shapes. It's > not a general purpose programming language. > > OpenSCAD's use of the term "variable" is consistent with the meaning of > "variable" in mathematics, and in pure functional programming languages. > The word "variable" in mathematics and formal logic has a distinguished > history going back hundreds of years, and I don't think there's a problem > using that word with its traditional meaning. > > The terminology I'd get rid of instead is "assignment statement". I > consider `x = 1;` to be a "definition" of `x`. It's a mathematical equation > that defines the meaning of `x` within its scope. The underlying > mathematical reason that `x = x + 1;` is invalid is because this is not a > valid equation defining `x`. There is no number `x` that is equal to itself > plus 1. > > On 30 August 2016 at 08:09, L Boyd <lboyd@frontiernet.net> wrote: > > > I see multiple question from those new to OpenSCAD about what we call > > variables. They are confused because they are different from the variables > > used in many programming languages. They don't understand why the can't do > > a=a+1. > > > > They are not really constants either, because they can be overridden > > locally > > within inner scopes. > > > > Perhaps we should use an unfamiliar name, so that they have to read the > > definition for how to use them. > > > > I don't have any suggestions, but we need to discuss this before changing > > the manual. > > > > > > > > ----- > > Larry > > -- > > View this message in context: http://forum.openscad.org/ > > What-to-call-variables-tp18260.html > > Sent from the OpenSCAD mailing list archive at Nabble.com. > > > > _______________________________________________ > > OpenSCAD mailing list > > Discuss@lists.openscad.org > > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > > > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >-- End of excerpt from doug moen'
J
jon
Tue, Aug 30, 2016 8:31 PM

While "variable" may have a long history in math and logic, we are
dealing with a programming language here, and the term "variable" has a
common meaning that is, unfortunately, different than what is intended
in OpenSCAD.  I think calling those beasts "named constants" is the
closest we will come, and it will be much less confusing (to a
programmer) than "variable".  We need to document for the intended audience.

IMHO, of course.  Goes without saying

Jon

On 8/30/2016 4:14 PM, doug moen wrote:

OpenSCAD is a mathematical notation for describing geometric shapes.
It's not a general purpose programming language.

OpenSCAD's use of the term "variable" is consistent with the meaning
of "variable" in mathematics, and in pure functional programming
languages. The word "variable" in mathematics and formal logic has a
distinguished history going back hundreds of years, and I don't think
there's a problem using that word with its traditional meaning.

The terminology I'd get rid of instead is "assignment statement". I
consider x = 1; to be a "definition" of x. It's a mathematical
equation that defines the meaning of x within its scope. The
underlying mathematical reason that x = x + 1; is invalid is because
this is not a valid equation defining x. There is no number x that
is equal to itself plus 1.

On 30 August 2016 at 08:09, L Boyd <lboyd@frontiernet.net
mailto:lboyd@frontiernet.net> wrote:

 I see multiple question from those new to OpenSCAD about what we call
 variables. They are confused because they are different from the
 variables
 used in many programming languages. They don't understand why the
 can't do
 a=a+1.

 They are not really constants either, because they can be
 overridden locally
 within inner scopes.

 Perhaps we should use an unfamiliar name, so that they have to
 read the
 definition for how to use them.

 I don't have any suggestions, but we need to discuss this before
 changing
 the manual.
While "variable" may have a long history in math and logic, we are dealing with a programming language here, and the term "variable" has a common meaning that is, unfortunately, different than what is intended in OpenSCAD. I think calling those beasts "named constants" is the closest we will come, and it will be much less confusing (to a programmer) than "variable". We need to document for the intended audience. IMHO, of course. Goes without saying Jon On 8/30/2016 4:14 PM, doug moen wrote: > OpenSCAD is a mathematical notation for describing geometric shapes. > It's not a general purpose programming language. > > OpenSCAD's use of the term "variable" is consistent with the meaning > of "variable" in mathematics, and in pure functional programming > languages. The word "variable" in mathematics and formal logic has a > distinguished history going back hundreds of years, and I don't think > there's a problem using that word with its traditional meaning. > > The terminology I'd get rid of instead is "assignment statement". I > consider `x = 1;` to be a "definition" of `x`. It's a mathematical > equation that defines the meaning of `x` within its scope. The > underlying mathematical reason that `x = x + 1;` is invalid is because > this is not a valid equation defining `x`. There is no number `x` that > is equal to itself plus 1. > > On 30 August 2016 at 08:09, L Boyd <lboyd@frontiernet.net > <mailto:lboyd@frontiernet.net>> wrote: > > I see multiple question from those new to OpenSCAD about what we call > variables. They are confused because they are different from the > variables > used in many programming languages. They don't understand why the > can't do > a=a+1. > > They are not really constants either, because they can be > overridden locally > within inner scopes. > > Perhaps we should use an unfamiliar name, so that they have to > read the > definition for how to use them. > > I don't have any suggestions, but we need to discuss this before > changing > the manual. >
R
Ronaldo
Tue, Aug 30, 2016 10:00 PM

On Tue, Aug 30, 2016, 16:28 —  jdawgaz  wrote:
excuse me? There are assignments in Functional programming languages.
And yes, we really could use them. Functional programming languages in
simple terms make a
difference between where the variable (in memory) is, and the value that
points
to it.

I am far from being an expert in programming languages and I don't want to
start a controversy.

According to  wikipedia
https://en.wikipedia.org/wiki/Assignment_(computer_science)#Single_assignment
:

Any assignment that changes an existing value (e.g. x := x + 1) is
disallowed in purely functional languages.[4] In functional programming,
assignment is discouraged in favor of single assignment, also called
initialization. Single assignment is an example of name binding and
differs from assignment as described in this article in that it can only
be done once, usually when the variable is created; no subsequent
reassignment is allowed.

Named constant seems fair to me.

On Tue, Aug 30, 2016, 16:28 —  jdawgaz  wrote:
So, why have true variables only in certain circumstances (like for loops,
arguments in module calls, functions, etc), and not in others.
If a value could be assigned to a "variable" at any time, then the
controversy would just go away.

In none programming language I know, function and procedure arguments are
called variables. They are a way to reference values. In OpenSCAD for
statements, the identifier that index the iteration is just a named
reference of a value in a list or range inside a specific scope. It is not a
true variable.

--
View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18271.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

> On Tue, Aug 30, 2016, 16:28 — jdawgaz wrote: > excuse me? There are assignments in Functional programming languages. > And yes, we really could use them. Functional programming languages in > simple terms make a > difference between where the variable (in memory) is, and the value that > points > to it. I am far from being an expert in programming languages and I don't want to start a controversy. According to wikipedia <https://en.wikipedia.org/wiki/Assignment_(computer_science)#Single_assignment> : > Any assignment that changes an existing value (e.g. x := x + 1) is > disallowed in purely functional languages.[4] In functional programming, > assignment is discouraged in favor of single assignment, also called > initialization. Single assignment is an example of name binding and > differs from assignment as described in this article in that it can only > be done once, usually when the variable is created; no subsequent > reassignment is allowed. Named constant seems fair to me. > On Tue, Aug 30, 2016, 16:28 — jdawgaz wrote: > So, why have true variables only in certain circumstances (like for loops, > arguments in module calls, functions, etc), and not in others. > If a value could be assigned to a "variable" at any time, then the > controversy would just go away. In none programming language I know, function and procedure arguments are called variables. They are a way to reference values. In OpenSCAD for statements, the identifier that index the iteration is just a named reference of a value in a list or range inside a specific scope. It is not a true variable. -- View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18271.html Sent from the OpenSCAD mailing list archive at Nabble.com.
M
MichaelAtOz
Wed, Aug 31, 2016 5:14 AM

L Boyd wrote

True, but they are also more

for (a =[3:5])echo(a);    // 3 4 5

Remember this is not an iterative language, the for() does not loop in the
programmatic sense, it builds a tree of objects one branch for each
representation of the loop 'identifier', inside each of which the 'variable'
is a specific and seperate instantiation of that 'identifier'.

So:

for (i=[0:3])
translate([i*10,0,0])
cube(i+1);

Produces:

group() {
group() {
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
cube(size = [1, 1, 1], center = false);
}
multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
cube(size = [2, 2, 2], center = false);
}
multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
cube(size = [3, 3, 3], center = false);
}
multmatrix([[1, 0, 0, 30], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
cube(size = [4, 4, 4], center = false);
}
}
}

All instances of the for() exist at the same time, they do not iterate
sequentially.

In imperative programming languages 'variable' by definition can vary, thus
they also have 'constants' which can't. {corollary to Murphy's law: variable
won't & constants aren't}
{wikipedia} "In pure functional and logic languages,variables{*1} are bound
to expressions and keep a single value during their entire lifetime due to
the requirements of referential transparency", but it is common to use the
term 'variable' even tho they don't, and they don't generally have the
concept of 'constants'.

So technically, as a declarative language, 'variable' as a term IS
appropriate, but for imperative programmers 'constant' would be better.

{*1} I'd argue that wikipedia definition is wrong, it should be "
'identifiers' are bound to ..."

So how about, in the manual, we use the term 'identifier', and expunge
'variable'? Also any reference to 'assignment' changes to 'binding'.

?


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18275.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

L Boyd wrote > True, but they are also more > > for (a =[3:5])echo(a); // 3 4 5 Remember this is not an iterative language, the for() does not loop in the programmatic sense, it builds a tree of objects one branch for each representation of the loop 'identifier', inside each of which the 'variable' is a specific and seperate instantiation of that 'identifier'. So: for (i=[0:3]) translate([i*10,0,0]) cube(i+1); Produces: group() { group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [1, 1, 1], center = false); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [2, 2, 2], center = false); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [3, 3, 3], center = false); } multmatrix([[1, 0, 0, 30], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [4, 4, 4], center = false); } } } All instances of the for() exist at the same time, they do not iterate sequentially. In imperative programming languages 'variable' by definition can vary, thus they also have 'constants' which can't. {corollary to Murphy's law: variable won't & constants aren't} {wikipedia} "In pure functional and logic languages,variables{*1} are bound to expressions and keep a single value during their entire lifetime due to the requirements of referential transparency", but it is common to use the term 'variable' even tho they don't, and they don't generally have the concept of 'constants'. So technically, as a declarative language, 'variable' as a term IS appropriate, but for imperative programmers 'constant' would be better. {*1} I'd argue that wikipedia definition is wrong, it should be " 'identifiers' are bound to ..." So how about, in the manual, we use the term 'identifier', and expunge 'variable'? Also any reference to 'assignment' changes to 'binding'. ? ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18275.html Sent from the OpenSCAD mailing list archive at Nabble.com.
LB
L Boyd
Wed, Aug 31, 2016 1:23 PM

I know how OpenSCAD variables work and don't personally have a problem with
the name.

Having said that, imperative programmers, new to OpenSCAD, stumble on this.
They assume the terms variable and constant have the meaning they are use
to.

In their view, our variables are neither, but fall somewhere in between.

Perhaps semiconstant?


Larry

View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18281.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I know how OpenSCAD variables work and don't personally have a problem with the name. Having said that, imperative programmers, new to OpenSCAD, stumble on this. They assume the terms variable and constant have the meaning they are use to. In their view, our variables are neither, but fall somewhere in between. Perhaps semiconstant? ----- Larry -- View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18281.html Sent from the OpenSCAD mailing list archive at Nabble.com.
DS
Dan Shriver
Wed, Aug 31, 2016 1:27 PM

What's wrong with "scoped constant" . Only uses two words and it describes
the behavior.  Variables is definitely extremely misleading.
On Aug 31, 2016 9:23 AM, "L Boyd" lboyd@frontiernet.net wrote:

I know how OpenSCAD variables work and don't personally have a problem with
the name.

Having said that, imperative programmers, new to OpenSCAD, stumble on this.
They assume the terms variable and constant have the meaning they are use
to.

In their view, our variables are neither, but fall somewhere in between.

Perhaps semiconstant?


Larry

View this message in context: http://forum.openscad.org/
What-to-call-variables-tp18260p18281.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

What's wrong with "scoped constant" . Only uses two words and it describes the behavior. Variables is definitely extremely misleading. On Aug 31, 2016 9:23 AM, "L Boyd" <lboyd@frontiernet.net> wrote: > I know how OpenSCAD variables work and don't personally have a problem with > the name. > > Having said that, imperative programmers, new to OpenSCAD, stumble on this. > They assume the terms variable and constant have the meaning they are use > to. > > In their view, our variables are neither, but fall somewhere in between. > > Perhaps semiconstant? > > > > ----- > Larry > -- > View this message in context: http://forum.openscad.org/ > What-to-call-variables-tp18260p18281.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
LB
L Boyd
Wed, Aug 31, 2016 1:35 PM

Interesting possibility.

MichaelAtOz wrote

So how about, in the manual, we use the term 'identifier', and expunge
'variable'? Also any reference to 'assignment' changes to 'binding'.?


Larry

View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18283.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Interesting possibility. MichaelAtOz wrote > So how about, in the manual, we use the term 'identifier', and expunge > 'variable'? Also any reference to 'assignment' changes to 'binding'.? ----- Larry -- View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18283.html Sent from the OpenSCAD mailing list archive at Nabble.com.
LV
Lucas Vinicius Hartmann
Wed, Aug 31, 2016 2:19 PM

Why not call them symbols, as in symbolic math?

Variables in programming language have an implied time dependency. X=X+1 is
valid because it refers to two different X symbols, old and new.

Anyway, for loop iterative math can be replaced with recursive functions,
just like the classical factorial function. Tested something like this
yesterday, and it seemed to work. While this is a little harder to write, i
am OK with the behavior.
F(n) = n<1? 1 : n*F(n-1)

For loops in rendering work as they should.

Em 31 de ago de 2016 10:28, "Dan Shriver" tabbydan@gmail.com escreveu:

What's wrong with "scoped constant" . Only uses two words and it describes
the behavior.  Variables is definitely extremely misleading.
On Aug 31, 2016 9:23 AM, "L Boyd" lboyd@frontiernet.net wrote:

I know how OpenSCAD variables work and don't personally have a problem
with
the name.

Having said that, imperative programmers, new to OpenSCAD, stumble on
this.
They assume the terms variable and constant have the meaning they are use
to.

In their view, our variables are neither, but fall somewhere in between.

Perhaps semiconstant?


Larry

View this message in context: http://forum.openscad.org/What
-to-call-variables-tp18260p18281.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Why not call them symbols, as in symbolic math? Variables in programming language have an implied time dependency. X=X+1 is valid because it refers to two different X symbols, old and new. Anyway, for loop iterative math can be replaced with recursive functions, just like the classical factorial function. Tested something like this yesterday, and it seemed to work. While this is a little harder to write, i am OK with the behavior. F(n) = n<1? 1 : n*F(n-1) For loops in rendering work as they should. Em 31 de ago de 2016 10:28, "Dan Shriver" <tabbydan@gmail.com> escreveu: > What's wrong with "scoped constant" . Only uses two words and it describes > the behavior. Variables is definitely extremely misleading. > On Aug 31, 2016 9:23 AM, "L Boyd" <lboyd@frontiernet.net> wrote: > >> I know how OpenSCAD variables work and don't personally have a problem >> with >> the name. >> >> Having said that, imperative programmers, new to OpenSCAD, stumble on >> this. >> They assume the terms variable and constant have the meaning they are use >> to. >> >> In their view, our variables are neither, but fall somewhere in between. >> >> Perhaps semiconstant? >> >> >> >> ----- >> Larry >> -- >> View this message in context: http://forum.openscad.org/What >> -to-call-variables-tp18260p18281.html >> Sent from the OpenSCAD mailing list archive at Nabble.com. >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
LB
L Boyd
Wed, Aug 31, 2016 5:48 PM

DanS wrote

What's wrong with "scoped constant" . Only uses two words and it describes
the behavior.  Variables is definitely extremely misleading.

Excellent idea. It correctly describes their behavior, while flagging the
difference from constants in many imperative programming languages.

That makes 2 votes, how about anyone else?


Larry

View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18285.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

DanS wrote > What's wrong with "scoped constant" . Only uses two words and it describes > the behavior. Variables is definitely extremely misleading. > Excellent idea. It correctly describes their behavior, while flagging the difference from constants in many imperative programming languages. That makes 2 votes, how about anyone else? ----- Larry -- View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18285.html Sent from the OpenSCAD mailing list archive at Nabble.com.
LB
L Boyd
Wed, Aug 31, 2016 5:53 PM

Good description, better than what I wrote in the manual.

MichaelAtOz wrote

Remember this is not an iterative language, the for() does not loop in the
programmatic sense, it builds a tree of objects one branch for each
representation of the loop 'identifier', inside each of which the
'variable' is a specific and seperate instantiation of that 'identifier'.

So:

for (i=[0:3])
translate([i*10,0,0])
cube(i+1);

Produces:

group() {
group() {
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
cube(size = [1, 1, 1], center = false);
}
multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
cube(size = [2, 2, 2], center = false);
}
multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
cube(size = [3, 3, 3], center = false);
}
multmatrix([[1, 0, 0, 30], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
cube(size = [4, 4, 4], center = false);
}
}
}

All instances of the for() exist at the same time, they do not iterate
sequentially.


Larry

View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18286.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Good description, better than what I wrote in the manual. MichaelAtOz wrote > Remember this is not an iterative language, the for() does not loop in the > programmatic sense, it builds a tree of objects one branch for each > representation of the loop 'identifier', inside each of which the > 'variable' is a specific and seperate instantiation of that 'identifier'. > > So: > > for (i=[0:3]) > translate([i*10,0,0]) > cube(i+1); > > Produces: > > group() { > group() { > multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { > cube(size = [1, 1, 1], center = false); > } > multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { > cube(size = [2, 2, 2], center = false); > } > multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { > cube(size = [3, 3, 3], center = false); > } > multmatrix([[1, 0, 0, 30], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { > cube(size = [4, 4, 4], center = false); > } > } > } > > All instances of the for() exist at the same time, they do not iterate > sequentially. ----- Larry -- View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18286.html Sent from the OpenSCAD mailing list archive at Nabble.com.
R
runsun
Fri, Sep 2, 2016 6:09 PM

lhartmann wrote

Why not call them symbols, as in symbolic math?

+1


$  Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 );   $ tips: hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf )

View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18306.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

lhartmann wrote > Why not call them symbols, as in symbolic math? +1 ----- $ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); &nbsp; $ tips: hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf ) -- View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18306.html Sent from the OpenSCAD mailing list archive at Nabble.com.
DB
don bright
Sun, Sep 4, 2016 5:39 PM

I just had a great idea for a name.

Zarfog the Destroyer

Zarfog Destroys all before him, lays waste to the values of previously
declared Zarfogs. None are left in his path.

--
don bright
hmbright@fastmail.com

On Tue, Aug 30, 2016, at 07:09 AM, L Boyd wrote:

I see multiple question from those new to OpenSCAD about what we call
variables. They are confused because they are different from the
variables
used in many programming languages. They don't understand why the can't
do
a=a+1.

They are not really constants either, because they can be overridden
locally
within inner scopes.

Perhaps we should use an unfamiliar name, so that they have to read the
definition for how to use them.

I don't have any suggestions, but we need to discuss this before changing
the manual.


Larry

View this message in context:
http://forum.openscad.org/What-to-call-variables-tp18260.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I just had a great idea for a name. Zarfog the Destroyer Zarfog Destroys all before him, lays waste to the values of previously declared Zarfogs. None are left in his path. -- don bright hmbright@fastmail.com On Tue, Aug 30, 2016, at 07:09 AM, L Boyd wrote: > I see multiple question from those new to OpenSCAD about what we call > variables. They are confused because they are different from the > variables > used in many programming languages. They don't understand why the can't > do > a=a+1. > > They are not really constants either, because they can be overridden > locally > within inner scopes. > > Perhaps we should use an unfamiliar name, so that they have to read the > definition for how to use them. > > I don't have any suggestions, but we need to discuss this before changing > the manual. > > > > ----- > Larry > -- > View this message in context: > http://forum.openscad.org/What-to-call-variables-tp18260.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
RP
Ronaldo Persiano
Sun, Sep 4, 2016 6:27 PM

Great idea, indeed! It distinguish it from
Joker-you-will-never-know-who-I-am, AKA variables.

2016-09-04 14:39 GMT-03:00 don bright hmbright@fastmail.com:

I just had a great idea for a name.

Zarfog the Destroyer

Zarfog Destroys all before him, lays waste to the values of previously
declared Zarfogs. None are left in his path.

--
don bright
hmbright@fastmail.com

On Tue, Aug 30, 2016, at 07:09 AM, L Boyd wrote:

I see multiple question from those new to OpenSCAD about what we call
variables. They are confused because they are different from the
variables
used in many programming languages. They don't understand why the can't
do
a=a+1.

They are not really constants either, because they can be overridden
locally
within inner scopes.

Perhaps we should use an unfamiliar name, so that they have to read the
definition for how to use them.

I don't have any suggestions, but we need to discuss this before changing
the manual.


Larry

View this message in context:
http://forum.openscad.org/What-to-call-variables-tp18260.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Great idea, indeed! It distinguish it from Joker-you-will-never-know-who-I-am, AKA variables. 2016-09-04 14:39 GMT-03:00 don bright <hmbright@fastmail.com>: > I just had a great idea for a name. > > Zarfog the Destroyer > > Zarfog Destroys all before him, lays waste to the values of previously > declared Zarfogs. None are left in his path. > > > -- > don bright > hmbright@fastmail.com > > On Tue, Aug 30, 2016, at 07:09 AM, L Boyd wrote: > > I see multiple question from those new to OpenSCAD about what we call > > variables. They are confused because they are different from the > > variables > > used in many programming languages. They don't understand why the can't > > do > > a=a+1. > > > > They are not really constants either, because they can be overridden > > locally > > within inner scopes. > > > > Perhaps we should use an unfamiliar name, so that they have to read the > > definition for how to use them. > > > > I don't have any suggestions, but we need to discuss this before changing > > the manual. > > > > > > > > ----- > > Larry > > -- > > View this message in context: > > http://forum.openscad.org/What-to-call-variables-tp18260.html > > Sent from the OpenSCAD mailing list archive at Nabble.com. > > > > _______________________________________________ > > OpenSCAD mailing list > > Discuss@lists.openscad.org > > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
RW
Rob Ward
Tue, Sep 6, 2016 10:47 AM

It seems to me that "Varonstants" would be a good name. That should
alert the people who are quick to make assumptions about languages from
their own reference points, that is, hey! this is something you've
probably not come across before?

Would I be churlish to suggest that it appears that openSCAD was a 3-D
solids tool that began as a quick way into defining solids, required
nice curves, endpoints and ranges, so adopted the mathematics, but never
quite got the programming side of it right, and that the present way
that varonstants are treated is sort of an oversight because openSCAD is
just a "solids defining tool", and not a strictly and ideal programming
language at all?? In other words the refinement of the programming
aspects of the language has been a compromise from the early days when
to render a shape was cool and the ramifications of the script behind it
was just accepted, warts and all.  After all a statement that says
cube([1,2,3]) that does not resemble a cube is somewhat of a giveaway.

On the other hand... I am really pleased with openSCAD mainly because I
am happy with simple stuff and have no desires to push the boundaries
and happy to live within its present limitations. I have completed many
productive projects through to 3D Printed objects as a result. A
fantastic tool.  I just don't think that people have a right to
seriously admonish the work of so many that have created this tool with
too many high minded criticisms.  I admire the work of people who have
volunteered to contribute to this project, and especially to those who
recognise its origins and strive to move us all onwards.

On 05/09/16 04:27, Ronaldo Persiano wrote:

Great idea, indeed! It distinguish it from
Joker-you-will-never-know-who-I-am, AKA variables.

2016-09-04 14:39 GMT-03:00 don bright <hmbright@fastmail.com
mailto:hmbright@fastmail.com>:

 I just had a great idea for a name.

 Zarfog the Destroyer

 Zarfog Destroys all before him, lays waste to the values of previously
 declared Zarfogs. None are left in his path.


 --
   don bright
 hmbright@fastmail.com <mailto:hmbright@fastmail.com>

 On Tue, Aug 30, 2016, at 07:09 AM, L Boyd wrote:

I see multiple question from those new to OpenSCAD about what we

 call

variables. They are confused because they are different from the
variables
used in many programming languages. They don't understand why

 the can't

do
a=a+1.

They are not really constants either, because they can be overridden
locally
within inner scopes.

Perhaps we should use an unfamiliar name, so that they have to

 read the

definition for how to use them.

I don't have any suggestions, but we need to discuss this before

 changing

the manual.


Larry

View this message in context:
http://forum.openscad.org/What-to-call-variables-tp18260.html

 <http://forum.openscad.org/What-to-call-variables-tp18260.html>

Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org mailto:Discuss@lists.openscad.org

 http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
 <http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org>

 _______________________________________________
 OpenSCAD mailing list
 Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org>
 http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
 <http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org>

OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--

Rob Ward
Lake Tyers Beach, 3909
Lake Tyers Beach Website http://www.laketyersbeach.net.au
XP to XUbuntu http://www.laketyersbeach.net.au/XP2XU.html

It seems to me that "Varonstants" would be a good name. That should alert the people who are quick to make assumptions about languages from their own reference points, that is, hey! this is something you've probably not come across before? Would I be churlish to suggest that it appears that openSCAD was a 3-D solids tool that began as a quick way into defining solids, required nice curves, endpoints and ranges, so adopted the mathematics, but never quite got the programming side of it right, and that the present way that varonstants are treated is sort of an oversight because openSCAD is just a "solids defining tool", and not a strictly and ideal programming language at all?? In other words the refinement of the programming aspects of the language has been a compromise from the early days when to render a shape was cool and the ramifications of the script behind it was just accepted, warts and all. After all a statement that says cube([1,2,3]) that does not resemble a cube is somewhat of a giveaway. On the other hand... I am really pleased with openSCAD mainly because I am happy with simple stuff and have no desires to push the boundaries and happy to live within its present limitations. I have completed many productive projects through to 3D Printed objects as a result. A fantastic tool. I just don't think that people have a right to seriously admonish the work of so many that have created this tool with too many high minded criticisms. I admire the work of people who have volunteered to contribute to this project, and especially to those who recognise its origins and strive to move us all onwards. On 05/09/16 04:27, Ronaldo Persiano wrote: > Great idea, indeed! It distinguish it from > Joker-you-will-never-know-who-I-am, AKA variables. > > 2016-09-04 14:39 GMT-03:00 don bright <hmbright@fastmail.com > <mailto:hmbright@fastmail.com>>: > > I just had a great idea for a name. > > Zarfog the Destroyer > > Zarfog Destroys all before him, lays waste to the values of previously > declared Zarfogs. None are left in his path. > > > -- > don bright > hmbright@fastmail.com <mailto:hmbright@fastmail.com> > > On Tue, Aug 30, 2016, at 07:09 AM, L Boyd wrote: > > I see multiple question from those new to OpenSCAD about what we > call > > variables. They are confused because they are different from the > > variables > > used in many programming languages. They don't understand why > the can't > > do > > a=a+1. > > > > They are not really constants either, because they can be overridden > > locally > > within inner scopes. > > > > Perhaps we should use an unfamiliar name, so that they have to > read the > > definition for how to use them. > > > > I don't have any suggestions, but we need to discuss this before > changing > > the manual. > > > > > > > > ----- > > Larry > > -- > > View this message in context: > > http://forum.openscad.org/What-to-call-variables-tp18260.html > <http://forum.openscad.org/What-to-call-variables-tp18260.html> > > Sent from the OpenSCAD mailing list archive at Nabble.com. > > > > _______________________________________________ > > OpenSCAD mailing list > > Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org> > > > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > <http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org> > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > <http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org> > > > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -- *Rob Ward* Lake Tyers Beach, 3909 Lake Tyers Beach Website <http://www.laketyersbeach.net.au> XP to XUbuntu <http://www.laketyersbeach.net.au/XP2XU.html>
D
dmcnutt
Tue, Sep 6, 2016 9:18 PM

"It seems to me that "Varonstants" would be a good name."

Sure.  Anything but a term that is well defined in the subject of
mathematics.

I have been working with a solid representation of a circular circuit
board that will use traces to conduct current and generate torque at
slower than "normal" electric motors. openSCAD has been very helpful.

I have been creating Gerber files to represent the current carrying
conductors on the circuit board. Because Gerber doesn't support rotation
other than in 90 degree increments I have been using perl as a
programming compiler and it works like a charm once you learn the wide
use of special symbols in its commands.

The math is no joke involving computations that involve cross products
of real three dimension vectors consisting of 3 "variables" that are the
elements of electric and magnetic field vectors in three dimensional space.

What I need are designs for parts that will provide for mounting
bearings on the circuit board that will allow it to spin while holding
it all down to planet earth with other parts that will be needed to hold
everything down but rotateable. If the number of magnets changes I need
to calculate new coordinates for the location of mounting holes.

openSCAD is a bit like perl. They both expect programming lines in ASCII
text but perl does define its variables in the way that allows vector
components to be a "variable" in the mathematical sense. Your code can
change the values at will. perl provides the commands "our" and "my"
that are used to define variables as they are required. The "my" version
defines a variable that is forgotten about after the end of the { } pair
that defines a programming section. I have no trouble using it to make a
subroutine use the letters x, y, and z as vector parts and then use the
same text in another subroutine.

The lady of the house once worked for a data-base oriented company and
was not surprised by the idea that a word was defined it was always the
same and wondered why I had a hard time with openSCAD.  I reminded her
that I first programmed a Control Data 1604 with an assembler before
FORTRAN became the language of choice for a physicist. Fortran was the
earliest treatment of variables and it said anything that doesn't start
with IJKLM or N was a floating point variable. Others are integers
mostly for controlling loops. First use defines a name. If you want data
to be sent to subroutines without passing values in a call you had the
COMMON statement to define variables that would be available anywhere.
COMMON is almost the same as OUR which can also apply to strings of
text.  I don't really like it but perhaps starting with an upper case
letter could define one of your "variable only once" items.

In any case I need to prepare drawings for the parts I will need for a
variety of outside diameters. Hopefully openSCAD will help me to create
parts that will work over a whole array of outside diameters. I just
have to figure where to put them as I change the requirements. That's a
whole bunch of variables that must change.

I have been considering a programming exercise that would create an
openSCAD text file that makes it all work together when it's executed.

But. . .  I REALLY like the ability to reset the view of the finished
project by sliding a mouse around. Perl can't do that. I do wish I could
read the dimension scales after saying I want them on the front.

And one more.  I have used Vectorworks because I have a copy.  It's an
older version that can export to *.dxf but reading that when you have to
have the right year assigned or *.dxf is not well understood by anyone.
Sigh...

And. . . .  I really like the work you're doing. A big THANK YOU !!!

"It seems to me that "Varonstants" would be a good name." Sure. Anything but a term that is well defined in the subject of mathematics. I have been working with a solid representation of a circular circuit board that will use traces to conduct current and generate torque at slower than "normal" electric motors. openSCAD has been very helpful. I have been creating Gerber files to represent the current carrying conductors on the circuit board. Because Gerber doesn't support rotation other than in 90 degree increments I have been using perl as a programming compiler and it works like a charm once you learn the wide use of special symbols in its commands. The math is no joke involving computations that involve cross products of real three dimension vectors consisting of 3 "variables" that are the elements of electric and magnetic field vectors in three dimensional space. What I need are designs for parts that will provide for mounting bearings on the circuit board that will allow it to spin while holding it all down to planet earth with other parts that will be needed to hold everything down but rotateable. If the number of magnets changes I need to calculate new coordinates for the location of mounting holes. openSCAD is a bit like perl. They both expect programming lines in ASCII text but perl does define its variables in the way that allows vector components to be a "variable" in the mathematical sense. Your code can change the values at will. perl provides the commands "our" and "my" that are used to define variables as they are required. The "my" version defines a variable that is forgotten about after the end of the { } pair that defines a programming section. I have no trouble using it to make a subroutine use the letters x, y, and z as vector parts and then use the same text in another subroutine. The lady of the house once worked for a data-base oriented company and was not surprised by the idea that a word was defined it was always the same and wondered why I had a hard time with openSCAD. I reminded her that I first programmed a Control Data 1604 with an assembler before FORTRAN became the language of choice for a physicist. Fortran was the earliest treatment of variables and it said anything that doesn't start with IJKLM or N was a floating point variable. Others are integers mostly for controlling loops. First use defines a name. If you want data to be sent to subroutines without passing values in a call you had the COMMON statement to define variables that would be available anywhere. COMMON is almost the same as OUR which can also apply to strings of text. I don't really like it but perhaps starting with an upper case letter could define one of your "variable only once" items. In any case I need to prepare drawings for the parts I will need for a variety of outside diameters. Hopefully openSCAD will help me to create parts that will work over a whole array of outside diameters. I just have to figure where to put them as I change the requirements. That's a whole bunch of variables that must change. I have been considering a programming exercise that would create an openSCAD text file that makes it all work together when it's executed. But. . . I REALLY like the ability to reset the view of the finished project by sliding a mouse around. Perl can't do that. I do wish I could read the dimension scales after saying I want them on the front. And one more. I have used Vectorworks because I have a copy. It's an older version that can export to *.dxf but reading that when you have to have the right year assigned or *.dxf is not well understood by anyone. Sigh... And. . . . I really like the work you're doing. A big THANK YOU !!!
JL
Jean-Paul Louis
Wed, Sep 7, 2016 1:56 AM

Why not call them what they really are, PARAMETERS?

Just my $0.02,
Jean-Paul
N1JPL

On Sep 6, 2016, at 5:18 PM, dmcnutt dmcnutt@macnauchtan.com wrote:

Why not call them what they really are, PARAMETERS? Just my $0.02, Jean-Paul N1JPL > On Sep 6, 2016, at 5:18 PM, dmcnutt <dmcnutt@macnauchtan.com> wrote: > >
RU
Richard Urwin
Wed, Sep 7, 2016 10:52 AM

I like PARAMETERS, that makes sense.

On Tue, Sep 6, 2016 at 10:18 PM, dmcnutt dmcnutt@macnauchtan.com wrote:

In any case I need to prepare drawings for the parts I will need for a

variety of outside diameters. Hopefully openSCAD will help me to create
parts that will work over a whole array of outside diameters. I just have to
figure where to put them as I change the requirements. That's a whole bunch
of variables that must change.

That's a good example of the difference between variables and constants.
Variables can and do change between calculations, constants don't. But in
mathematics and OpenSCAD variables keep the same value throughout a program.

There is a variety of computer architecture called "Data-Flow". It removes
the bottle-neck caused by only having a single processor by contructing a
program as a flow of data between operations. When a particular operation
has all its inputs available then it is executed. The program can be easily
distibuted between many processors; it's a very interesting technique. It
also shares OpenSCAD's requirement that variables do not change because
loops have to be unwrapped into a single path of data. Each operation on
that path can only be executed once just as in OpenSCAD each created
polyhedron is unique and unchanging. Our experiences with OpenSCAD could
feed into language design in the data-flow field and vice-versa.

It seems to me that one time "a = a + 1" is desired is within loops, and
that is usually because the loop variable is doing something else. I have
recently been using the following construction when iterating over lists in
C++:

for (element = First(), count = 0; element != NULL && count < 1000; element
= Next(element), count++)

Maybe something similar could be provided in OpenSCAD, or maybe there could
be a function that returned the loop index: 0 on the first iteration, 1 on
the second, and so on, even if the loop was over elements of a list.

The other use of "a = a + 1" is to count occurrences of some event. In that
case the intermediate values of the variable are never used; only the final
value is valid when all the events have been counted. Maybe we could have a
"tally" statement that made such a use explicit. I don't think that would
break OpenSCAD.

I have been considering a programming exercise that would create an

openSCAD text file that makes it all work together when it's executed.

I'm considering creating a pre-compiler that mixes OpenSCAD and Python.

Fortran was the earliest treatment of variables and it said anything that
doesn't start with IJKLM or N was a
floating point variable.

GOD is REAL (unless declared INTEGER)

--
View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18337.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I like PARAMETERS, that makes sense. On Tue, Sep 6, 2016 at 10:18 PM, dmcnutt <dmcnutt@macnauchtan.com> wrote: > In any case I need to prepare drawings for the parts I will need for a variety of outside diameters. Hopefully openSCAD will help me to create parts that will work over a whole array of outside diameters. I just have to figure where to put them as I change the requirements. That's a whole bunch of variables that must change. That's a good example of the difference between variables and constants. Variables can and do change between calculations, constants don't. But in mathematics and OpenSCAD variables keep the same value throughout a program. There is a variety of computer architecture called "Data-Flow". It removes the bottle-neck caused by only having a single processor by contructing a program as a flow of data between operations. When a particular operation has all its inputs available then it is executed. The program can be easily distibuted between many processors; it's a very interesting technique. It also shares OpenSCAD's requirement that variables do not change because loops have to be unwrapped into a single path of data. Each operation on that path can only be executed once just as in OpenSCAD each created polyhedron is unique and unchanging. Our experiences with OpenSCAD could feed into language design in the data-flow field and vice-versa. It seems to me that one time "a = a + 1" is desired is within loops, and that is usually because the loop variable is doing something else. I have recently been using the following construction when iterating over lists in C++: for (element = First(), count = 0; element != NULL && count < 1000; element = Next(element), count++) Maybe something similar could be provided in OpenSCAD, or maybe there could be a function that returned the loop index: 0 on the first iteration, 1 on the second, and so on, even if the loop was over elements of a list. The other use of "a = a + 1" is to count occurrences of some event. In that case the intermediate values of the variable are never used; only the final value is valid when all the events have been counted. Maybe we could have a "tally" statement that made such a use explicit. I don't think that would break OpenSCAD. > I have been considering a programming exercise that would create an > openSCAD text file that makes it all work together when it's executed. I'm considering creating a pre-compiler that mixes OpenSCAD and Python. > Fortran was the earliest treatment of variables and it said anything that > doesn't start with IJKLM or N was a > floating point variable. GOD is REAL (unless declared INTEGER) -- View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18337.html Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Wed, Sep 7, 2016 11:28 AM

If you want to have both an element and its index you can do this:

for(i = [0 : len(list) - 1]) {
element = list[i];
...
}

To count occurrences you can use a recursive function instead of a for
loop.

function count_events(list, i = 0, tally = 0) = i == len(list) ? tally :
count(list, i + 1, tally + is_event(list[i]) ? 1 : 0);

On 7 September 2016 at 11:52, Richard Urwin <
soronlin+openscad@googlemail.com> wrote:

I like PARAMETERS, that makes sense.

On Tue, Sep 6, 2016 at 10:18 PM, dmcnutt dmcnutt@macnauchtan.com wrote:

In any case I need to prepare drawings for the parts I will need for a

variety of outside diameters. Hopefully openSCAD will help me to create
parts that will work over a whole array of outside diameters. I just have
to
figure where to put them as I change the requirements. That's a whole bunch
of variables that must change.

That's a good example of the difference between variables and constants.
Variables can and do change between calculations, constants don't. But in
mathematics and OpenSCAD variables keep the same value throughout a
program.

There is a variety of computer architecture called "Data-Flow". It removes
the bottle-neck caused by only having a single processor by contructing a
program as a flow of data between operations. When a particular operation
has all its inputs available then it is executed. The program can be easily
distibuted between many processors; it's a very interesting technique. It
also shares OpenSCAD's requirement that variables do not change because
loops have to be unwrapped into a single path of data. Each operation on
that path can only be executed once just as in OpenSCAD each created
polyhedron is unique and unchanging. Our experiences with OpenSCAD could
feed into language design in the data-flow field and vice-versa.

It seems to me that one time "a = a + 1" is desired is within loops, and
that is usually because the loop variable is doing something else. I have
recently been using the following construction when iterating over lists in
C++:

for (element = First(), count = 0; element != NULL && count < 1000; element
= Next(element), count++)

Maybe something similar could be provided in OpenSCAD, or maybe there could
be a function that returned the loop index: 0 on the first iteration, 1 on
the second, and so on, even if the loop was over elements of a list.

The other use of "a = a + 1" is to count occurrences of some event. In that
case the intermediate values of the variable are never used; only the final
value is valid when all the events have been counted. Maybe we could have a
"tally" statement that made such a use explicit. I don't think that would
break OpenSCAD.

I have been considering a programming exercise that would create an

openSCAD text file that makes it all work together when it's executed.

I'm considering creating a pre-compiler that mixes OpenSCAD and Python.

Fortran was the earliest treatment of variables and it said anything that
doesn't start with IJKLM or N was a
floating point variable.

GOD is REAL (unless declared INTEGER)

--
View this message in context: http://forum.openscad.org/
What-to-call-variables-tp18260p18337.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

If you want to have both an element and its index you can do this: for(i = [0 : len(list) - 1]) { element = list[i]; ... } To count occurrences you can use a recursive function instead of a for loop. function count_events(list, i = 0, tally = 0) = i == len(list) ? tally : count(list, i + 1, tally + is_event(list[i]) ? 1 : 0); On 7 September 2016 at 11:52, Richard Urwin < soronlin+openscad@googlemail.com> wrote: > I like PARAMETERS, that makes sense. > > On Tue, Sep 6, 2016 at 10:18 PM, dmcnutt <dmcnutt@macnauchtan.com> wrote: > > > In any case I need to prepare drawings for the parts I will need for a > variety of outside diameters. Hopefully openSCAD will help me to create > parts that will work over a whole array of outside diameters. I just have > to > figure where to put them as I change the requirements. That's a whole bunch > of variables that must change. > > > That's a good example of the difference between variables and constants. > Variables can and do change between calculations, constants don't. But in > mathematics and OpenSCAD variables keep the same value throughout a > program. > > There is a variety of computer architecture called "Data-Flow". It removes > the bottle-neck caused by only having a single processor by contructing a > program as a flow of data between operations. When a particular operation > has all its inputs available then it is executed. The program can be easily > distibuted between many processors; it's a very interesting technique. It > also shares OpenSCAD's requirement that variables do not change because > loops have to be unwrapped into a single path of data. Each operation on > that path can only be executed once just as in OpenSCAD each created > polyhedron is unique and unchanging. Our experiences with OpenSCAD could > feed into language design in the data-flow field and vice-versa. > > It seems to me that one time "a = a + 1" is desired is within loops, and > that is usually because the loop variable is doing something else. I have > recently been using the following construction when iterating over lists in > C++: > > for (element = First(), count = 0; element != NULL && count < 1000; element > = Next(element), count++) > > Maybe something similar could be provided in OpenSCAD, or maybe there could > be a function that returned the loop index: 0 on the first iteration, 1 on > the second, and so on, even if the loop was over elements of a list. > > The other use of "a = a + 1" is to count occurrences of some event. In that > case the intermediate values of the variable are never used; only the final > value is valid when all the events have been counted. Maybe we could have a > "tally" statement that made such a use explicit. I don't think that would > break OpenSCAD. > > > > I have been considering a programming exercise that would create an > > openSCAD text file that makes it all work together when it's executed. > > > I'm considering creating a pre-compiler that mixes OpenSCAD and Python. > > > Fortran was the earliest treatment of variables and it said anything that > > doesn't start with IJKLM or N was a > > floating point variable. > > GOD is REAL (unless declared INTEGER) > > > > -- > View this message in context: http://forum.openscad.org/ > What-to-call-variables-tp18260p18337.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
TP
Torsten Paul
Wed, Sep 7, 2016 12:13 PM

Von: "Richard Urwin" soronlin+openscad@googlemail.com

It seems to me that one time "a = a + 1" is desired is within
loops, and that is usually because the loop variable is doing
something else.

That already exists as experimental feature:

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/WIP#for_expression

I'm considering creating a pre-compiler that mixes OpenSCAD
and Python.

Please consider contributing to OpenSCAD directly. Yes, it's
much more difficult to change things that are already used by
lots of people who really don't want their scripts broken by
updates (which unfortunately does happen, most of the time
not intentionally).
On the other hand, it is used by lots of people which does
make things interesting and rewarding :-).

While there are probably a number of use cases where external
programs using OpenSCAD as backend make very much sense, it's
still a bit sad to see all those projects started with huge
enthusiasm die after half a year or so when it gets hard to
continue supporting users.

ciao,
Torsten.

Von: "Richard Urwin" <soronlin+openscad@googlemail.com> > It seems to me that one time "a = a + 1" is desired is within > loops, and that is usually because the loop variable is doing > something else. > That already exists as experimental feature: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/WIP#for_expression > I'm considering creating a pre-compiler that mixes OpenSCAD > and Python. > Please consider contributing to OpenSCAD directly. Yes, it's much more difficult to change things that are already used by lots of people who really don't want their scripts broken by updates (which unfortunately does happen, most of the time not intentionally). On the other hand, it *is used* by lots of people which does make things interesting and rewarding :-). While there are probably a number of use cases where external programs using OpenSCAD as backend make very much sense, it's still a bit sad to see all those projects started with huge enthusiasm die after half a year or so when it gets hard to continue supporting users. ciao, Torsten.
R
Ronaldo
Wed, Sep 7, 2016 1:07 PM

Counting ocurrences of some event was one of the first astonishing task stuck
me in my first steps in OpenSCAD when I found that variables are immutable.
I finally arrived to this non recursive solution:

len( [ for(element=list) if(event_predicate(element)) 1] )

For the problem of finding the first ocurrence of an event, you always can
do:

[ for(element=list) if(event_predicate(element)) element ][0]

Another surprising task was to add up the elements of a list. Now I have a
bunch of solutions to that.
Besides given better name to what is called now variables, it is important
to ilustrate the techniques for common tasks like those in the manual.

--
View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18340.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Counting ocurrences of some event was one of the first astonishing task stuck me in my first steps in OpenSCAD when I found that variables are immutable. I finally arrived to this non recursive solution: len( [ for(element=list) if(event_predicate(element)) 1] ) For the problem of finding the first ocurrence of an event, you always can do: [ for(element=list) if(event_predicate(element)) element ][0] Another surprising task was to add up the elements of a list. Now I have a bunch of solutions to that. Besides given better name to what is called now variables, it is important to ilustrate the techniques for common tasks like those in the manual. -- View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18340.html Sent from the OpenSCAD mailing list archive at Nabble.com.
RU
Richard Urwin
Wed, Sep 7, 2016 2:00 PM

tp3 wrote

Von: "Richard Urwin" <

soronlin+openscad@

>

I'm considering creating a pre-compiler that mixes OpenSCAD
and Python.

While there are probably a number of use cases where external
programs using OpenSCAD as backend make very much sense, it's
still a bit sad to see all those projects started with huge
enthusiasm die after half a year or so when it gets hard to
continue supporting users.

What I'm thinking about would be a dozen lines or so of code. Basically
search and replace <<...>> with "print """...""" and then execute the
resulting program. There is a bit more stuff around defining the input and
output streams and handling includes, but not much.

I'll need more experience before I'm comfortable suggesting modifications to
OpenSCAD, and plugging an imperative language into it would just make for
confusion. The sorts of things that might be interesting are constructions
like this: http://www2.cmp.uea.ac.uk/~jrwg/Sisal/16.Seq.loops.html

--
View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18341.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

tp3 wrote > Von: "Richard Urwin" &lt; > soronlin+openscad@ > &gt; > >> I'm considering creating a pre-compiler that mixes OpenSCAD >> and Python. >> > While there are probably a number of use cases where external > programs using OpenSCAD as backend make very much sense, it's > still a bit sad to see all those projects started with huge > enthusiasm die after half a year or so when it gets hard to > continue supporting users. What I'm thinking about would be a dozen lines or so of code. Basically search and replace <<...>> with "print """...""" and then execute the resulting program. There is a bit more stuff around defining the input and output streams and handling includes, but not much. I'll need more experience before I'm comfortable suggesting modifications to OpenSCAD, and plugging an imperative language into it would just make for confusion. The sorts of things that might be interesting are constructions like this: http://www2.cmp.uea.ac.uk/~jrwg/Sisal/16.Seq.loops.html -- View this message in context: http://forum.openscad.org/What-to-call-variables-tp18260p18341.html Sent from the OpenSCAD mailing list archive at Nabble.com.