Forum: Ruby Re: Ruby Whitespace Semantics

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jim F. (Guest)
on 2006-02-27 17:07
(Received via mailing list)
Matz has said that

a = (4
       +5)

will be supported in 1.9.
unknown (Guest)
on 2006-02-27 18:54
(Received via mailing list)
Quoting Jim F. <removed_email_address@domain.invalid>:

> Matz has said that
>
> a = (4
>        +5)

Hmm.  What about

 a = ( 4 ; + 5 )

?

I won't be heartbroken if it isn't, but I'm just wondering about the
implications for the grammar...

-mental
Mark W. (Guest)
on 2006-02-27 21:04
(Received via mailing list)
<removed_email_address@domain.invalid> wrote in message
news:removed_email_address@domain.invalid...

>Hmm.  What about
> a = ( 4 ; + 5 )

It should be a syntax error.
Logan C. (Guest)
on 2006-02-27 21:10
(Received via mailing list)
On Feb 27, 2006, at 2:03 PM, Mark W. wrote:

> <removed_email_address@domain.invalid> wrote in message
> news:removed_email_address@domain.invalid...
>
>> Hmm.  What about
>> a = ( 4 ; + 5 )
>
> It should be a syntax error.

Why? The semantics seem perfectly clear.
unknown (Guest)
on 2006-02-27 21:50
(Received via mailing list)
Quoting Mark W. <removed_email_address@domain.invalid>:

> >Hmm.  What about
> > a = ( 4 ; + 5 )
>
> It should be a syntax error.

Ruby has an unary +...

-mental
Hal F. (Guest)
on 2006-02-28 02:30
(Received via mailing list)
Mark W. wrote:
> <removed_email_address@domain.invalid> wrote in message
> news:removed_email_address@domain.invalid...
>
>
>>Hmm.  What about
>>a = ( 4 ; + 5 )
>
>
> It should be a syntax error.

Why/how?


Hal
This topic is locked and can not be replied to.