sealed

Oliver Ruebenacker <[email protected]> Thu, 11 Feb 2016 13:32:51 -0500
Newsgroups gmane.comp.lang.scala
Message-ID <CAA=X4OBvV_8STJQG8N2JacsZ3_6PRs1rQwU=5eitbE4qcKEP=w@mail.gmail.com>
     Hello,

  I love the feature of having sealed types that can only be directly
extended by a limited set of sub-types. However, I find it quite awkward
that the allowed direct sub-types are those that are in the same file.
First, this collides almost always with my preferences of what I would like
to put in the same file and what not. Second, it requires careful reading
of the entire file to find them all.

  Why not list the allowed sub-types, for example like this:

  sealed(B, C, D) trait A

  meaning that A can only be directly extended by B, C and D.

     Best, Oliver

-- 
Oliver Ruebenacker
Senior Software Engineer, Diabetes Portal
<http://www.type2diabetesgenetics.org/>, Broad Institute
<http://www.broadinstitute.org/>

-- 
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.