From: Brian Candler Date: 2004-10-10T18:48:08+09:00 Subject: Re: ANN: Free-form-operators patch On Sun, Oct 10, 2004 at 04:19:30AM +0900, Charles Hixson wrote: > Similarly, if user defineable operators become a part of the language, > nobody will be required to use them. I'll just chime in once, to say I support Hal's view, which he expressed very eloquently. I realise that I am treading on somewhat dangerous water here, in that I have been involved in other threads on things like method call versus block call semantics. I'm not saying the language cannot be improved, and I'm equally sure a lot of user input and suggestions over the last ten or eleven years have helped make 1.8.x as good as it is. However, ISTM that what's being described here is a substantially different language to Ruby. Sure, there is some intellectual satisfaction in the exercise; you can continue down this route making the language somehow more 'flexible' or 'pure' or 'minimalist' or whatever - like removing instance variables altogether and replacing them with closures. It would be interesting to see what the smallest subset of Ruby is that can bootstrap up to the full feature set. Maybe it would end up looking like Lisp (or Eiffel, Smalltalk, Haskell or many other languages mentioned here as comparatives before which I don't know or use) However, Matz has been doing the language-design exercise for more than 10 years, and most of us are very happy with what he's produced. This idea has probably been floated and considered in the past. If it's not in the language, probably it doesn't fit his overall world view of what the language should look like. Draw your own conclusions from his silence on this thread, and on the likelihood of this feature ever making it into the core. > If it doesn't do anything important, it will be > forgotten. If it doesn't do anything important, then it shouldn't have been added in the first place. ISTM that user-defined operators are nothing more than syntactic sugar, which Ruby has plenty of already, and add nothing that can't be done with a handful more keystrokes. I'd rather see discussion on language semantics, which can make life substantially easier or harder when programming. > If it does, then those who find it important will learn how > to use that feature. And if someone wants to use two mutually > incompatible dialects, then they will need to come up with a way to > harmonize them. Or just use a different language in the first place, which is more suitable to their particular problem domain. Ruby matches the problem domains that I deal with very nicely at the moment. > It shouldn't, and doesn't have to be, an all or nothing kind of thing. > It should be a"Use however much you want, and don't complain bitterly if > you cut your finger on the bleeding edge. You were warned." kind of > thing. Naturally exotic features will have less support. The original comment I wrote at this point was: "Personally I see Ruby as a stable platform to do real work on, not an experimental platform for wannabe language designers." But then I realised it sounded bitchy as hell. No offence is intended to anyone, so please substitute a less inflammatory statement of your choosing. Regards, Brian.