Posts

Showing posts with the label package

Scala Package Objects

Image
So lets talk about this feature most people dont know scala has is the ability to use package objects. You might dont find that useful since you have do the same with different techniques but i think this is great for the granularity scala have to control visibility. You can use this feature to create DSL or simple to empower abstractions this feature is compiled so its safe but could lead to bad code if you dont use it with window. Because you can be sharing variables everywhere so this is really useful for module design but  as i sad you need o be careful.