From: Markus Date: 2004-10-12T01:21:08+09:00 Subject: Re: ANN: Free-form-operators patch > In message "Re: ANN: Free-form-operators patch" > on Mon, 11 Oct 2004 17:38:39 +0900, Yukihiro Matsumoto writes: > > |I haven't settled my opinion about this patch. Surely this is a > |interesting change, but has some concerns. *smile* agreed on both counts. As I've stated several times, I'm not arguing for this as a change at this time--it is an exploration, and an unproven one at that. It is not (IMHO) RCR-ready yet. The main value initial--letting people extend things to suit themselves rather than lobbying for changes in the core classes might be obtained even if it were never "accepted"; anyone who wanted to argue for a change could prototype it with this patch as a step in demonstrating how their idea would work (I'm thinking of the Associations class idea, and some of the people who are playing with ranges). Prototyping in this way might help people find the weaknesses in their ideas (I know it does for me). > * This patch makes difficult to add new operators in the language in > the future. For example, I might feel like to add '->' behave as > lambda as in Perl6. I wasn't familiar with the '->' in perl6, but was guessing it was something like the trick in scheme. When I went to look it up, I noticed that perl6 also has user defined operators of arbitrary precedence--or will, if/when it finally comes out ("operator subroutines" in http://dev.perl.org/perl6/apocalypse/A06.html). I'm not thrilled with Larry's design at first glance, but that just may be overspill from the fact that I find perl cluttered in the first place. But still I found it amusing. I don't think the patch would make it any harder to add operators in the future--any more than user defined methods make it harder to add methods. In a way, it might make it easier, since they could be written in ruby. What it would make harder is "pseudo-operators" such as "<<" (in the class & here-doc contexts) which are more reserved words that operators; those could get even messier to add than they already are. -- Markus