claude.pache at gmail.com
Sat Nov 25 18:10:43 UTC 2017
> Le 25 nov. 2017 à 16:03, kai zhu <kaizhu256 at gmail.com> a écrit :
> i disagree. you can write more maintainable and cleaner code with the
> premise typeof's will never change again (and give a one-time pass for
> symbols), instead of over-engineered paranoid code that it *may*
> change again in the future.
It is the responsibility of the programmer to write *forward-compatible* code, i.e., code that does not make assumptions that are *likely* to break in the future. For instance, one can *reasonably* think that the domain of the `typeof` operator may expand.
Naturally, the programmer should be smart enough in order to make the difference between paranoia and common sense: this is part of the art of programming.
More information about the es-discuss