Hacker News new | ask | show | jobs
by salil999 1354 days ago
> Having static fields and state is to be avoided.

This is totally false. It will always depend on the use case.

1 comments

State, 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.