Dependence on Programming Experts
Richard Gaskin
ambassador at fourthworld.com
Tue Jul 11 21:49:34 EDT 2006
Troy Rollins wrote:
> On Jul 11, 2006, at 8:05 PM, Mark Smith wrote:
>
>> So in Revolution, 'x = 5' is an expression that evaluates to true
>> if the value held in variable x happens to be 5, and I'd imagine
>> that changing this might cause all sorts of trouble. Maybe it would
>> be practical to implement a pascal-type '==' assignment operator,
>> but I don't know enough about the way scripts are compiled to know
>> if that could happen.
>
> I understand the historical "reasons", but the argument that it would
> mess anything up I just can't see. Like anything else, the purpose is
> within the context.
>
> You would no sooner put
>
> x = 5
>
> on a line by itself for any reason other than assignment of value,
> than you would put
>
> true
>
> or
>
> false
>
> on lines by themselves. I don't see any opportunity for ambiguity of
> intention here. Director has had this syntax without problems for
> many years.
>
> x = 5 // assignment
> if x = 5 then // comparison
I think Troy's on to something very important there.
The key thing to remember with this proposed addition is that it's an
ADDITION, and OPTION that one can CHOOSE to use if they like, or not if
they don't.
It does no harm to the current language, and offers greater freedom for
a wider range of programming styles.
As long as the language already supports things as arcane as Regex
without argument, it seems silly to fight options like an assignment
operator most of the rest of the world uses.
If it offends, one can simply not use it and - poof! -- like magic it's
no longer an issue.
--
Richard Gaskin
Fourth World Media Corporation
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list