By bloid
via alblue.blogspot.com
Published: Dec 06 2007 / 11:44
In the previous post, we covered using the compiler and packages. This time, we'll be looking at one of the features that makes Scala stand out above the rest; case classes and matching.
The idea behind case classes is to support data encapsulated as an object, but to also support structural matching of the data as well. A case class is defined in much the same way as an ordinary class, except that the class definition is prefixed with case:
SaveShareSend
Tags: other languages
Comments
bluterminus replied ago:
scala seems interesting
Voters For This Link (14)
Voters Against This Link (0)