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

Re: Re: val 1 = 2 compiles

1 reply
Lars Hupel
Joined: 2010-06-23,
User offline. Last seen 44 weeks 3 days ago.

> why writing 43 characters instead of 19? :-)

You certainly have a point here. I agree that such a function (maybe on
`Predef`) incurs a significant amount of noise. But as already written
somewhere in the thread, the `val` syntax does not allow `|`. Also, a
`MatchError` is misleading for an assertion -- just because an assertion
happens to be a match does not mean we should not use an
`AssertionError` or something along those lines.

rytz
Joined: 2008-07-01,
User offline. Last seen 45 weeks 5 days ago.
Re: Re: Re: val 1 = 2 compiles


On Fri, Aug 26, 2011 at 10:13, Lars Hupel <hupel [at] in [dot] tum [dot] de> wrote:
> why writing 43 characters instead of 19? :-)

You certainly have a point here. I agree that such a function (maybe on
`Predef`) incurs a significant amount of noise. But as already written
somewhere in the thread, the `val` syntax does not allow `|`. Also, a
`MatchError` is misleading for an assertion -- just because an assertion
happens to be a match does not mean we should not use an
`AssertionError` or something along those lines.
 I know, I was joking a bit. As said before, I'm not arguing this is the best style.

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