3 ms·
Would I be correct in thinking this is a similar argument those put forward by GvR against the desirability of multi-line lambdas in Python? i.e. once you need
by andybak 10y ago
Would I be correct in thinking this is a similar argument those put forward by GvR against the desirability of multi-line lambdas in Python? i.e. once you need multiple lines then you probably should be naming them.
- noselasd 10y agoYes. There's no pride in jamming the most amount of code into one line unless you're entering a contest.
- KON_Air 10y agoHeh, I remember being kind of scolded for using anything but "isolated functions" in MVC courses.
- chriswarbo 10y agoSurely it's the current one-line* restriction which forces "jamming the most amount of code into one line". Allowing multiple lines, by definition, allows breaking up those lines. * It's not actually one-line, it's one expression; Python's just picky about where you're allowed to break up an expression over multiple lines. For example see http://softwareengineering.stackexchange.com/questions/99243/why-doesnt-python-allow-multi-line-lambdas/252546#252546 http://softwareengineering.stackexchange.com/questions/99243...
- randallsquared 10y agoI don't think GP meant one editor line, but one "line of code".
- 198918282 10y agoThe naming part is, I don't see the connection with the multi-line part. GvR just does not like functional programming very much, so Python has peculiar name spaces and second class lambdas.