This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDL Notice: Arithmetic Operators / Quasi-Formulae


Hi Jim,

On Tue, 2004-06-22 at 00:19, Jim Kingdon wrote:

> I suppose
> 
> (++ 5)    =>    6

This can be done and seems reasonable. Another nested test would have to
be hacked into the tokenizer, though.

> might be better, although of course it isn't like the C ++ because it
> just returns the incremented value, rather than assigning.

True. But, I think that after a C programmer, unfamiliar with Lisp, has
read that 'remove' and 'append' don't really assign anything either,
he/she is going to get the hint that assigning isn't the Lisp/GDL way
(aside from 'define' and 'set').

> (inc 5)

Also sounds reasonable. This would save us from any further tokenizer
hacking.

> Or of course going back to (+ 5 1) if all of these choices seem
> problematic.

Yeah, but the whole point was to try to make some shorthand notation for
increment and decrement.

  Thanks for the feedback,
     Eric


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]