3 ms·
> Having static fields and state is to be avoided. This is totally false. It will always depend on the use case.
by salil999 4y ago
> Having static fields and state is to be avoided.
This is totally false. It will always depend on the use case.
- mcculley 4y agoState, while necessary, is the enemy of sanity. It should be kept to a minimum and be well marked as dangerous. The change I would most like to see in a new Java syntax would be to make final and immutable the default. Force the programmer to make clear where state lives.