4 ms·
A few more guidelines that seem obvious to me, but which I see broken all the time: 1) If an API value can be changed any time, it should probably be a plain o
by fenomas 9y ago
A few more guidelines that seem obvious to me, but which I see broken all the time:
1) If an API value can be changed any time, it should probably be a plain object property
2) If an API value can be changed but there are side effects, it should probably be a "setFoo" method
3) If an API value can be specified, but not changed after init/instantiation, it should probably be an argument to the constructor or init function