https://butterword.com/ibis-gancho-the-go-getters-una-nueva-miniserie-que-celebra-la-diversion-de-correr/?feed_id=61448&_unique_id=694c7b47ae74d
Getter That MODIFIES Itself When Called?!
This getter is ALIVE! Every time you access it, it CHANGES its own behavior. First call returns one value, second call returns something completely different. This self-modifying code will break your logic!
#javascript #javascripttricks #getters #object.defineproperty #selfmodifyingcode #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #propertydescriptors #advancedjavascript
aeveltstra - My #java source code uses mostly #immutable value classes to pass around the processed data, plus a bunch of #static helper classes just to get the app running, reading configurations, and perform checks.
I have very little use for #getters, and would rather do away with them. However: it happens quite a lot that I'm abstracting the concrete implementation class, and using an #interface instead.
A colleague just forwarded this short article with lots of thoughtful comments on use of #getters and #setters (mostly in #Java):