in reply to Re^2: Quantum Weirdness and the Increment Operator
in thread Quantum Weirdness and the Increment Operator
- The pre- and post-increment are documented somewhere.
- That documentation is in perlop.
- Perlop says "If you do X in Perl, it is the same as doing X in Foo".
- The documentation for Foo (which is as easily obtainable as perlop) is that doing X has (deliberately?) undefined behavior.
The documentation is complete. The problem isn't a problem. That the documentation refers to other documentation may be annoying, but it is complete. And, whether you like it or not, every single person who worked/works on the Perl sourcecode and nearly everyone who worked/works on the Perl design is fluent in C and has no problem with statements like that. In other words, any single person who would have ever worked on the documentation is fluent in C and has no problem with statements like that.
. . . so I recommend you to send a documentation patch for perlop that clarifies what "as in C" really means if this upsets you so much.
Ah, but he's not the one who's upset by the documentation. You are. He (and I) is upset by your unwillingness to read said documentation.
An analogy - if you were to pick up a textbook on calculus, it would assume you knew how to do algebra. Would this bother you? What if it said "The edge cases of this transformation are similar to this transformation as done in Set theory."? Because, frankly, that's what perlop is saying. "The edge cases of the pre- and post-increment operators are the same as in C."
Let's look at something else - the reason why it's the same as in C. Because Perl is implemented in C! Do you really think the Perl developers reinvented the wheel here? No! They delegated to the source language, because that's the behavior they were looking for. And, if the ANSI C standard ever changes how this edge case behaves, then Perl will have that change as a matter of course. Hence, the reason to refer to the C documentation. It's very OO in its thinking. We inherit from C and delegate back to C.
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Quantum Weirdness and the Increment Operator
by japhy (Canon) on Jun 24, 2004 at 13:37 UTC | |
by itub (Priest) on Jun 24, 2004 at 15:42 UTC | |
by japhy (Canon) on Jun 24, 2004 at 16:26 UTC | |
by diotalevi (Canon) on Jun 24, 2004 at 17:49 UTC | |
| |
Re^4: Quantum Weirdness and the Increment Operator
by ysth (Canon) on Jun 24, 2004 at 18:12 UTC |