3 ms·
Too often I see functions that are shells that reshuffle the arguments and pass them to another function, which also reshuffles the arguments and forwards them
by WalterBright 2y ago
Too often I see functions that are shells that reshuffle the arguments and pass them to another function, which also reshuffles the arguments and forwards them to another, and on and on. One was 11 layers deep.
- Copenjin 2y agoAnd a lot of people doesn't understand how dangerous shuffling parameters is, especially in languages that do not have named parameters...
- Pxtl 2y agoPowershell is an awful language but it has made me fall in love with named parameters. Name all the things.
- mrkeen 2y agoIf you have a 2-4 line function and you spot this, you can trivially remove it.
- js8 2y agoI have seen such code too - with just S,K and I combinators. It wasn't readable.