It does hide something. It hides *the implementation* of
the function hypot().
In effect, elsewhere in your code you could have the explicit
... = sqrt((x * x) + (y * y));
or,
... = hypot(x, y);
It's just eliminating (code) redundancy and duplication.
I.e. this addendum was meant on a more abstract/logical ground, thus the
name of the chapter.
[cut]
> locally stored and therefore not hidden. Your rule would require
> the replication of three floating-point variables NotGood(tm).
This isn't really my rule. I didn't invent or came up with anything
new here.
Documentation/CodingStyle is remarkably similar to most of what
you'd find in [1], and those rules are more or less from that
same book.
Actually, the whole point of my posting the patch is the last rule,
since well thought out data representation makes or breaks the code.
References:
[1] ``The Elements of Programming Style'' by Kernighan
and Plauger, 2nd ed, 1988, McGraw-Hill.
-- Luben
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/