Linus Torvalds wrote:


On Jun 1, 2014 9:05 AM, "Dirk Hohndel" <[email protected] <mailto:[email protected]>> 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*.


I heartily disagree.  The only places we need to treat air specially is:

- when we read dives from a file. then we should do the right thing and set the correct gas fractions from the start. - when we save dives to a file. (if we want to not print o2=20.9, that is. and we probably do)
- when we want do display air as the text "air" in the gui

That's it.  It's not wrong at all.

Henrik

_______________________________________________
subsurface mailing list
[email protected]
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to