3 ms·
> The first one is only necessary in languages where functions can have side effects To be more precise, it is only necessary in language where all functions c
by sspiff 11y ago
> The first one is only necessary in languages where functions can have side effects
To be more precise, it is only necessary in language where all functions can have side effects. Some language (like D) have the ability to mark a function as "pure" (without side effects), which allow the compiler to perform additional optimizations (and purity validation).