[#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:01117] Re: The value of while...

From: matz@... (Yukihiro Matsumoto)
Date: 2000-01-12 06:48:24 UTC
List: ruby-talk #1117
In message "[ruby-talk:01114] Re: The value of while..."
    on 00/01/12, Dave Thomas <Dave@thomases.com> writes:

|> But using the value of void expression is clearly an error.  I think
|> it'd be reported somehow.   By warning?
|
|I guess my point is that this is the only place the concept of 'void
|expression' appears. It is otherwise not expressible as a value, nor
|can you test for it (a.void?).

Hmm, but it's a attribute of the statement which cannot be treated by
the programs directly.  What do you (and others) think about each of
the ideas below:

  * make it warning.
  * leave it as it is.
  * remove this check.
  * something else.

|This is really not a big deal - I was just trying to write down a
|description of Ruby, and I wrote 'everything is an expression' and
|then stopped to think. I'm sure you've got way better things to think
|about. (Although I still quite like the idea of 'break' returning a
|value ;-)

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

							matz.

In This Thread