case class Mountain( val name: String, val latitude: Int, val longtitude: Int, var country: String)
For the above code you get a nice factory like
Mountain('name', 11, 12, 'nowhere')
with hashCode, toString and equals. Plus that you can use this class to decompose it using pattern matching:
mountain match { case Mountain(name, _, _, country) => println(name + ' located in ' + country) }
The future is here - it's just not evenly distributed:
http://scala-lang.org
case class Mountain( val name: String, val latitude: Int, val longtitude: Int, var country: String)
For the above code you get a nice factory like
Mountain('name', 11, 12, 'nowhere')
with hashCode, toString and equals. Plus that you can use this class to decompose it using pattern matching:
mountain match { case Mountain(name, _, _, country) => println(name + ' located in ' + country) }
The future is here - it's just not evenly distributed:
http://scala-lang.org