This page is no longer maintained — Please continue to the home page at

Re: using extended abstract class

No replies
Seth Tisue
Joined: 2008-12-16,
User offline. Last seen 34 weeks 3 days ago.

>>>>> "Axel" == Axel Rose writes:

Axel> object Cards { sealed abstract class Suit case class Club extends
Axel> Suit

I suggest using "case object" here, not "case class". You don't ever
want to have more than one instance of Club.

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