2 ms·
> keep sending in objects every time I make a method call Classes and objects can actually be good syntactic sugar to solve this same problem. You can get a lo
by smt88 9y ago
> keep sending in objects every time I make a method call
Classes and objects can actually be good syntactic sugar to solve this same problem. You can get a lot of the benefit of functional programming by writing immutable classes without any inheritance. The first argument of any method in the class is assumed to be the class itself, which is "POJO/POCO" and immutable -- "this" becomes a read-only keyword.
- some_account 9y agoYeah it seems like a good way to get the best of both worlds :)