laziness, impatience, and hubris | |
PerlMonks |
Re: Perl::Improved Volume 0, Number 1by theorbtwo (Prior) |
on Sep 05, 2004 at 11:44 UTC ( [id://388591]=note: print w/replies, xml ) | Need Help?? |
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. Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).
In Section
Meditations
|
|