Facets of Immutability

Immutability, the cornerstone of functional programming, has many facets. Not every (mainstream) language supports all the facets; at least not per what each facet stands for. That’s what I will talk about today. The various facets of immutability from a theoretical perspective, and briefly show how some of…

final, const and beyond

What are your thoughts on the following piece of code? [code lang=java] public String someGibberishMethod() { int length = someMethodReturningLength(); int sum = 0; for (int index = 0; index < length; ++index) { // some code that updates the sum variable } SomeClass someClass = new SomeClass(sum); int sumValueInsideSomeClass = someClass.getSumValue(); // use someText, maybe log…