Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: inlining your sort subroutine Message-ID: <10521@jpl-devvax.JPL.NASA.GOV> Date: 24 Nov 90 20:41:41 GMT References: <109155@convex.convex.com> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 18 In article <109155@convex.convex.com> tchrist@convex.com (Tom Christiansen) writes: : Instead of having to doing this: : : sub numerically { $a <=> $b; } : @out = sort numerically @in; : : wouldn't this be nice: : : @out = sort { $a <=> $b; } @in; It would be possible, but apart from the problem you mentioned of making it hard to find the list, I also think people should occasionally be encouraged to name their abstractions. Of course, the fact that it would be hard to implement has nothing to do with it... :-) Larry