Re: oom() _still_ killing init

Matthew Wilcox (Matthew.Wilcox@genedata.com)
Thu, 17 Jun 1999 21:12:10 +0200


On Thu, Jun 17, 1999 at 10:05:52AM -0500, Oliver Xymoron wrote:
> You're kidding. Tell me you're joking, please. This is the most
> superfluous use of a goto I've ever seen. There are good reasons not to
> use gotos, such as readability, maintainability, reliability, and the
> like. While performance may take precedence in schedule (at least until we
> make the compiler smarter), the same is certainly not true here.

On the other hand, there are good reasons to use gotos, such as
readability, maintainability and the like (reliability? My code is
less reliable if I use a goto? huh?). While I agree that those don't
really apply to a 5 line function, this is a common idiom within the
linux kernel for very good reasons.

Try tidying up some of the functions in the vfs to not use goto and watch
your indentation disappear off the end of your screen, your neighbour's
screen and out of the window. I tried this once and came out a changed
man, convinced of the usefulness of goto.

Yes, of course you can make a mess with goto. Don't do that.

-- 
Matthew Wilcox <willy@bofh.ai>
"Windows and MacOS are products, contrived by engineers in the service of
specific companies. Unix, by contrast, is not so much a product as it is a
painstakingly compiled oral history of the hacker subculture." - N Stephenson

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/