2022-05-02

Deep immutability assessment

Programmers all over the world are embracing immutability more and more; however, mutation is still a thing, and in all likelihood it will continue being a thing for as long as there will be programmers. In a world where both mutable and immutable objects exist side by side, there is often a need to ascertain that a certain object is of the immutable variety before proceeding to use it for certain purposes. 

For example, when an object is used as a key in a hash map, the object better be immutable, or else the hash code of the key may change, causing the map to severely malfunction. Note that when this happens, it tends to be a bug which is very difficult to troubleshoot.

Unfortunately, immutability assessment is not an easy task. Most don't even consider it, few talk about it, even fewer actually do it. Programmers all over the world are accustomed to using objects in scenarios where immutability is required, but without ascertaining it, essentially praying that the objects be immutable. There exist libraries that will ascertain immutability, but judging by how marginal status these libraries have in the greater technology landscape, they are not being put into much use.

Introducing Bathyscaphe

Bathyscaphe is a very small library aiming to give the Java world another chance at addressing the problem of immutability assessment instead of letting it linger on like a chronic ailment that you really should go see a doctor about, but keep postponing because you have no time for that.