[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: expressions vs. statements
At 07:29 PM 12/18/2001, Michael Vanier wrote:
>> Date: Tue, 18 Dec 2001 15:45:15 -0800 (PST)
>> From: Paul Graham <email@example.com>
>> This is actually a question people on this list might
>> have interesting opinions about. Does distinguishing
>> between expressions and statements buy you anything in
>> expressive power? I have often wondered about what
>> the point of this distinction was...
I've been very happy with just expressions in my language.
However, i've also had a sequential form like (begin) in Scheme, (progn) is Lisp, or (do) in Arc which let you side effect and return a value.
Common Lisp function bodies had implicit tag blocks (sic?) where you could (return) a value for the function from some point in another control structure. This might give you Perl-like compact idioms, but I haven't missed such implicit combinations of control in Scheme. I can extend the syntax myself when i find such things essential, which hasn't been often.