[OT] optional then?
Torsten Anders
t.anders at qub.ac.uk
Wed May 21 11:09:37 CEST 2003
On Wednesday, May 21, 2003, at 01:16 am, Simon Beaumont wrote:
> In article <EFB2EEA6-8A3E-11D7-8D8F-00039345928E at qub.ac.uk>,
> t.anders at qub.ac.uk (Torsten Anders) wrote:
>> On Monday, May 19, 2003, at 08:51 pm, Denys Duchier wrote:
>>
>>> gabor.szokoli at vanderbilt.edu (Gabor Szokoli) writes:
>>>> Would it make sense to make the "then" part of the if-then-else
>>>> optional just like the "else" part is?
>>> Is there any programming language in which the
>>> "THEN" part is optional?
>>
>> In Lisp you have both 'when' (quasi if without else) and 'unless' (quasi
>> if
>> without then). 'unless' is easy to read for me. Lisp is full of special
>> forms (control structures) because it does not use keywords. But I doubt
>> it
>> is a good idea to add more keywords to Oz.
>
> the only lisp special form in this context was "if"
> (cond ...)
> (unless ...)
> (when ...)
>
> were all macros
Of course you are right. Actually, I only tried to avoid to mention macros
;-) I learned macros were planned by deprecated for Oz, so I just tried to
avoid that term...
Best,
Torsten
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.
Please send bug reports to bugs at mozart-oz.org.
More information about the mozart-users
mailing list