[#1026] Is this a bug? — Dave Thomas <Dave@...>

18 messages 2000/01/03

[#1084] Infinite loop — Dave Thomas <Dave@...>

17 messages 2000/01/11

[#1104] The value of while... — Dave Thomas <Dave@...>

24 messages 2000/01/11

[ruby-talk:01119] Re: The value of while...

From: Clemens Hintze <c.hintze@...>
Date: 2000-01-12 07:47:51 UTC
List: ruby-talk #1119
Yukihiro Matsumoto writes:
> 
> In message "[ruby-talk:01114] Re: The value of while..."
>     on 00/01/12, Dave Thomas <Dave@thomases.com> writes:
> 

[...]

> Hmm, but it's a attribute of the statement which cannot be treated by
                                   ^^^^^^^^^

Perhaps that is the reason of confusion, IMHO. 'while' should be
considered as statement, not as expression! Dave is right here, to be
orthogonal 'while' should also return a value as every expression do!
I also do not like the idea of a special 'void' value for just that
case! But if 'while' would be considered as statement, it would not be
necessary to allow it to return a value! Perhaps simply change the
documentation and say 'statement' where there was 'expression' before?
;-)

[...]

> 
> `break' returning is as interesting as `break' with the label to exit.
> I couldn't decide.

What about to introduce both? :-)))) If you cannot decide ... take
both ;-))))

> 
> 							matz.
> 

\cle

-- 
Clemens Hintze  mailto: c.hintze@gmx.net

In This Thread