Scala

/Tag:Scala

Scala – change class’s functionality on the fly with trait

The very interesting feature of traits is possibility is dynamic mixin with other object. Why I’ve named it „dynamic”?. Because you can add trait not only to class but also to instance. It’s powerful feature that can change functionality of a class on the fly. […]

By | Czerwiec 20th, 2014|Categories: Development, Tips and Tricks|Tags: , |0 Comments

Tuples in Scala

I Like Tuples in Scala. I’m almost as happy as when I met Ranges in Groovy/Ruby. My main programming language is Java and there aren’t such nice control structures. Then, what is Tuple? Tuple in Scala is part of the Collections API. Tuple combines a fixed number of items together and all can be used as one object. Tuples can hold objects with different types (unlike an array or list) and are immutable. […]

By | Listopad 12th, 2013|Categories: Development|Tags: , |0 Comments