in reply to Perl::Improved Volume 0, Number 1
Your abs() critique raises points that I haven't seen raised around here before, at least in this purticular context... but it gets the conclusion wrong, by (I suspect conciously) only considering the point against the status quo -- that is, that there is a convention for writing the absolute value in mathematics, and that perl should follow that convention.
This misses a whole slew of points in the other direction. The first, and probably most important, is that special cases are bad. There's a whole bunch of functions in perl, and there's no purticular reason that this purticular function should be written differently then the rest of them. It's simply not that important. There are functions that do have special syntax -- +, -, *, /, %, x, for example -- but those are generally more important -- indeed, even in math, they're normally called "operators", not "functions".
Secondly, there's also a convention in other programming languages to use abs() as the absolute-value function.
Thirdly, we already have uses for |, and important ones at that. It turns out they don't conflict as a matter of grammar, but they can easily conflict within the mind of the programmer.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl::Improved Volume 0, Number 1
by Corion (Patriarch) on Sep 05, 2004 at 13:31 UTC | |
by theorbtwo (Prior) on Sep 06, 2004 at 01:56 UTC | |
| |
|
Re^2: Perl::Improved Volume 0, Number 1
by Aristotle (Chancellor) on Sep 05, 2004 at 13:41 UTC | |
by davido (Cardinal) on Sep 05, 2004 at 16:06 UTC | |
|