On Wednesday, December 11, 2002, at 03:27  PM, Michael G Schwern wrote:
There's lots of reasons to use an operator or built-in instead of a method, but remember to make the consideration first. Don't go grammar happy.
I agree 98% with your argument (especially re: grammar extensions), and it was very well explained. The 02% is this:

First, universal operators and universal methods both pollute the useful (programmer) namespace to nearly the same extent. It's just one pollution is alphanumeric, the other is punctuational. For example, '.eq' and '==' are (abstractly) just multimethods upon their invocant/arguments, tho one has a funny-charactered name. Either way, you're defining something that everyone has to remember, and that people can't use for their own purposes.

Second, one person's trivial feature is another person's dream come true. C<given>, for example, or vectorops. So the object-based argument can be used to support or crush pretty much *anything*, depending solely on POV. Or put any feature in or out of the "builtin" list, for that matter. It's only our opinions, we can't really justify them except through our own experiences.

So I don't think we have an alternative to just plain arguing over each such proposal as it arrives, which we *hope* will produce the overall correct results as a sheer accident of demographics.

MikeL

(I don't *really* think '===' is critically important, though as an obviously symmetric binary operation it has some minor charm. I tend to use the concept somewhat frequently, but others don't, so it probably doesn't pass the bar.)



Reply via email to