Comment on Real quick question about the "break"

<- View Parent
dgriffith@aussie.zone ⁨11⁩ ⁨months⁩ ago

you’ll see that he doesn’t like functions to be very long. I think his rule is no more than 4 lines.

Four line functions? Sounds like a codebase adhering to that rule would end up as a nice thick function soup. It feels like… I dunno, those database programmers that like normalising databases to the Nth degree.

If you put your loops into functions then you can just use return instead of break.

And that just sounds like abusing the concept of functions to replace standard flow control that your language provides.

But hey, I use C and on the rare occasion I sneak a goto in there, so I’m not qualified to pass too much judgement.

source
Sort:hotnewtop