|
|
|
|
|
by zaptheimpaler
4268 days ago
|
|
Another thing I like about Scala is its support for duck-typing like python, except it is actually enforced at compile time via traits and magic methods. e.g you can define your own methods to sugar and desugar for pattern matches, define an apply method to treat a class like a function, or map() on an Option type - it simply behaves as a list of size 0 or 1 and that is all you need to map. |
|