4 ms·
>The need for nested functions bugged me as well. That seems like an odd deal-breaker and hints at code smell Nested functions were a very common pattern on la
by pmarin 8y ago
>The need for nested functions bugged me as well. That seems like an odd deal-breaker and hints at code smell
Nested functions were a very common pattern on languages like Pascal, Modula or oberon. They are equivalent to code blocks inside a function in C.
- _veelo 8y agoIndeed, it serves encapsulation.
- WalterBright 8y agoThe equivalent in C is code blocks connected with gotos. In my conversions of C code to D, I'm able to replace these gotos with nested functions, which makes the code significantly easier to read.