This page is no longer maintained — Please continue to the home page at www.scala-lang.org

again still with the curly brackets dead equine

2 replies
Raoul Duke
Joined: 2009-01-05,
User offline. Last seen 42 years 45 weeks ago.

hi,

so, it appears i must have the { on the same line as the match, not on
the line after; even the compiler cannot fathom what on earth i could
possibly want, given that syntax. is there per chance any chance that
some day in the future Scala will be less inflexible wrt on which line
the open curly bracket goes?

thanks.

Raoul Duke
Joined: 2009-01-05,
User offline. Last seen 42 years 45 weeks ago.
Re: again still with the curly brackets dead equine

oh.

no, no actually it is just fine and i'm totally wrong in this case.

phew!

On Thu, Jan 27, 2011 at 11:55 AM, Raoul Duke wrote:
> hi,
>
> so, it appears i must have the { on the same line as the match, not on
> the line after; even the compiler cannot fathom what on earth i could
> possibly want, given that syntax. is there per chance any chance that
> some day in the future Scala will be less inflexible wrt on which line
> the open curly bracket goes?
>
> thanks.
>

ichoran
Joined: 2009-08-14,
User offline. Last seen 2 years 3 weeks ago.
Re: again still with the curly brackets dead equine
Can you provide an example of the code that doesn't work the way you want?

val isHello = "Hi" match
{
  case "Hi" => true
  case _ => false
}

works for me.

  --Rex

On Thu, Jan 27, 2011 at 2:55 PM, Raoul Duke <raould@gmail.com> wrote:
hi,

so, it appears i must have the { on the same line as the match, not on
the line after; even the compiler cannot fathom what on earth i could
possibly want, given that syntax. is there per chance any chance that
some day in the future Scala will be less inflexible wrt on which line
the open curly bracket goes?

thanks.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland