The best coding advice that was ever given to me
Walter Bright
newshound2 at digitalmars.com
Wed Dec 30 04:57:34 UTC 2020
On 12/29/2020 7:06 PM, Mathias LANG wrote:
> And regarding the `goto` => nested function transformation, contributors have
> been doing this for a few years with great results. E.g. in `typeMerge`:
> https://github.com/dlang/dmd/commit/5b3a28416610535a4d415e0f27323ed64ea3349f
> [...]
> In DMD's defense, the adage used to be "only have one exit point per function".
Recall also that DMD was written in C-with-classes, which does not have nested
functions, so goto was the best alternative.
More information about the Digitalmars-d
mailing list