On 11/04/09 05:02, Matt Wozniski wrote: > > On Fri, Apr 10, 2009 at 10:53 PM, Tony Mechelynck wrote: >> >> On 11/04/09 04:16, Matt Wozniski wrote: >>> >>> On Fri, Apr 10, 2009 at 6:43 PM, Tony Mechelynck wrote: >>>> >>>> Couldn't you run "test" just once? Maybe something more or less like >>>> >>>> if test -n "$x_includes" -a "$x_includes" != "NONE" >>>> >>>> Just my sense of aesthetics, I'm not on a Mac. >>> >>> Usually, yes - but lore tells of shells where "test" isn't POSIX >>> compatible, where "-a" and "-o" don't behave predictably but "&&" and >>> "||" do... >> >> Hm. What about the shells available on the Mac, and in particular on Mac >> OS X ? > > Changing the configure script would change things wherever ./configure > is used. And, besides, "it looks prettier" is hardly a reason to > accept behavior that might be broken somewhere. If we can agree that > "test ... -a ..." and "test ...&& test ..." are functionally > equivalent, but that the latter might work somewhere the former > doesn't, it's pretty clear that we should use the latter. > > ~Matt
OK. The former may run marginally faster due to the fact that the whole expression is computed in the same place (even on shells where test isn't a builtin), but that's hardly a reason to risk an easily avoidable malfunction. Best regards, Tony. -- The Preacher, the Politician, the Teacher, Were each of them once a kiddie. A child, indeed, is a wonderful creature. Do I want one? God Forbiddie! -- Ogden Nash --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---