[PATCH] Air isn't special

Linus Torvalds torvalds at linux-foundation.org
Sun Jun 1 09:21:09 PDT 2014


On Jun 1, 2014 9:05 AM, "Dirk Hohndel" <dirk at hohndel.org> wrote:
>
> I know that eventually Linus will chime in. There were a number of good
> reasons why we did this incredibly annoying thing. And every time I decide
> to say "to hell with Linus" and change it, he has a very good reason why
> that's a really dumb idea.

Air really *is* special.

And it's a lot easier to just use "get_o2()" than to fight that fundamental
fact.

Anybody who thinks air is just the same as nitrox with 21% o2 is out to
f*cking lunch. That may be true from a physics standpoint, but it is not
true in any other way.

Air is special because you have to check against both 21 and 20.9.

Air is special because it also is "uninteresting" for both loading and
saving.

Air is special because it's also "empty" as far as cylinder contents go
(and anybody who says that people should just write 21% to mark the
cylinder in use has his head so far up his ass that it's dark in there).

In other words, air IS SPECIAL.

Not making air special is a mistake. You'll end up having to add all those
"air is special" tests to various random places, and you'll forget some of
them. And when you forget one of them, you'll have really subtle bugs, that
are annoying and hard to find.

In contrast, of you'd just admit that air is special, all this goes away.
Use "get_o2()" and be happy. You'll never have to think about all the
special cases, and if you miss a get_o2() the big well be obvious and
clear.

Really. It is that simple. Air really is special. Don't try to make it be
just another form of nitrox, you're *wrong*.

          Linus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140601/9a2454b3/attachment.html>


More information about the subsurface mailing list