counter++ versus "add 1 to counter"
Scott Rossi
scott at tactilemedia.com
Sun Mar 21 11:51:30 EST 2004
On 3/21/04 7:45 AM, "A.C.T." <albrecht at act-net.com> wrote:
> I understand "Transcript" is trying to be a chimere of
> "human language" (which uses redundancy to gain clearness) and
> "progamming language" (which avoids redundancy to gain clearness). The
> drawback is that you (the developer) have to EXACTLY now what the
> language (Transcript) will do if you tell it something, whereas a
> "classic" high level language like C will ONLY do what you tell it,
> returning an error if you did not use the right variable type.
This is an interesting point of view Marc, but I wonder if you are basing
your point of view on your knowledge of C. Look at your example:
counter++
"..what "counter++" does: Increment a value (by one). That's clear and
there's no doubt about what is meant."
Stepping back from your knowledge of C, I would argue the above is not
clear. How do you know the counter is incremented by 1? No value is
indicated so how does someone know a value of 1 is used? Maybe the use of
"++" means add counter to itself? Maybe the value to be added was left out
of the code by mistake?
I know the previous statements are all wrong, but I'm suggesting that if you
look objectively at that example, it is no clearer or more confusing than
"add 1 to counter". And, if I understand what are saying, Transcript does
in fact return an error if you use incorrect variable types:
put "xyz" into A
add 7 to A
Will return an error as 'A' is not a number.
It's true, you "have to EXACTLY [k]now what the language (Transcript) will
do if you tell it something", but I expect the same goes for any programming
language, as demonstrated by your example. I would offer that Transcript
(and all xtalk for that matter) does not use redundancy to gain clearness,
but instead uses redundancy to gain flexibility.
Your turn... :-)
Regards,
Scott Rossi
Creative Director
Tactile Media, Development & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com
More information about the use-livecode
mailing list