On Wed, Mar 19, 2008 at 1:01 PM, Larry Wall <[EMAIL PROTECTED]> wrote: > While I agree with the sentiment of not arbitrarily restricting > people from doing ugly things unless they ask for such restrictions,
Agreed... though I disagree that the sort of overloading under discussion ("/" for separating paths) falls into the "ugly things" category. > I'd also like to point out that the desire to maintain consistent > symbolic distinctions is not limited to mathematicians. Absolutely. Or rather, not absolutely. I think absolute consistency is in the same category as absolute orthogonality... too much of a good thing. > The use of + in Python or << in C++ is, I think, primarily the > violation of a *linguistic* principle, not a mathematical principle. Maybe it's just 'cause I cut my teeth on BASIC, but + for string concatenation has always felt pretty natural. Obviously it won't work in Perl where you are using the operator to determine how to treat the operands. At first blush I find it more readily readable than "&" or "||", or even ".". And "<<" makes sense for the various kinds of appending it is used for in C++, Ruby, etc, but only if you don't look at it and think "bit shift". Fortuantely, bit shift isn't a fundamental arithmetic operation in the traditional sense, and the set of people who think that is proportionally smaller. > The typical user already has a good notion of what the common operators > are, and what they mean. So while drastically changing the meaning > of one of those operators may not be a disservice to the writer of > the code, it may well be a disservice to the reader. I agree *changing* the meaning is bad. But the Good Kind of operator overloading doesn't do that; it just adds a new meaning. It really is "overloading". Hopefully, the new meaning is somewhat related to the original - a sort of operator metonymy - but if the context is sufficiently different, that's not a requirement. Again, nobody's going to think you're dividing pathnames. > Perl is about linguistics, and hence is more concerned with successful > communication than with pure mathematical platonics. Which is why I like it so much more than certain of its brethren with their Orthogonality Ueber Alles attitude. I just don't want to see that sort of prescriptivity creep in to Perl. -- Mark J. Reed <[EMAIL PROTECTED]>