Re:Re: Linux 3.0-rc3 "In other words: don't be stupid."
by nathanb on Wednesday June 15, 2011 @03:06PM
(#2658565)
This is why autoconf annoys me. Sometimes it will actually check functionality, but most people just write rules to compare against version numbers. And of course they get it wrong and think that 1.8.12rc2 is somehow less recent than 1.8.9. Don't tell me it won't work, try it and show me it won't work.
Re:Re: Linux 3.0-rc3 "In other words: don't be stupid."
by mitchty on Wednesday June 15, 2011 @02:26PM
(#2658412)
Yep, he's pointing out that checking a version string doesn't actually check that the version you are running actually supports what you want.
One reason why in my code I check how something behaves and rarely for a version number. Test that a feature exists or not and base your behavior on that instead.
I suppose it's probably that quotes are selected for their brilliance, but bits of logic like Linus' in that post always awe me. They're so simple and right when you hear them, but you didn't think of them yourself.