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

Re: Proposed architecture of Scala's reflection library.

No replies
odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.


On Mon, Jul 11, 2011 at 7:04 PM, Paul Phillips <paulp@improving.org> wrote:
I'm surprised you haven't been bitten by scala's enumeration enough to avoid it here.  How about I make these case objects.


object Modifier extends Enumeration {

  val `protected`, `private`, `override`, `abstract`, `final`,
       `sealed`, `implicit`, `lazy`, `case`, `trait`,
       deferred, interface, mutable, parameter, covariant, contravariant,
       preSuper, abstractOverride, local, java, static, caseAccessor,
       defaultParameter, defaultInit, paramAccessor, bynameParameter = Value

}

Why spend 22 more classes? An enumeration is perfectly fine here.

 -- Martin


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