Andy's comments and positioning...
marty at vertex.ucls.uchicago.edu
Mon Feb 9 12:36:04 CST 2004
<sorry, lost track of who said what>
> >> x = y + z (instead of put y + z into x)
> >> x += 1 (instead of add 1 to x)
> >> x.myProperty = foo (instead of set myProperty of x to foo)
> >> Not supporting these standard statements make the language look a bit
> >> "beginner-ish".
> > I disagree. This is archaic C syntax. The '=' runs foul to math
> > syntax. C has been the ball and chain of programming language
> > development and we should not willingly adopt its syntax.
> x = y + z has nothing to do with C, it's standard mathematics notation.
> Every language that I've ever used, C, C++, Java, Eiffel, Perl, VB,
> ASP, PHP, Lingo -- with the singular exception of xTalk -- uses x = y +
> z instead of "put".
Pascal, which was designed as a teaching language, makes the
distinction between = and := the former being the comparison
operator and the latter being the assignment operator. It was
a very useful distinction when teaching beginners to think about
assigning values to variables. Students are already used to
thinking of = in math terms as the comparison operator (i.e.,
x = 4 + 3 means that x *equals* 7, not that x *becomes* 7 after
that statement occurs).
xTalk's "put" command is equally useful, as it helps students
to visualize variables as containers for data.
So, from a teaching standpoint, *don't* implement the C terminology;
it's a nightmare that should go away.
Marty Billingsley (marty at ucls.uchicago.edu)
The University of Chicago Laboratory Schools
"We are our choices...."
More information about the use-livecode