From: Jeremy McAnally Date: 2008-04-24T15:19:52+09:00 Subject: Re: [RCR] Drop :: as a . synonym Or changing #send to private...or (insert progressive but code breaking change here)... ;) I really resonate with your approach to thinking about language features. I've always thought that languages take the wrong approach when "working towards something new, exciting, bigger, and better" rather than "working towards what the language should have been." The latter results in a much cleaner language, where features become more perfect versions of their original counterparts and features are removed when they're identified as counter to the vision of the language, and that approach is perhaps, as far as I can tell, closer to the heart of what Matz intended for Ruby as opposed to the former. I have a lot of thought on this, but that's for another thread I guess... So, when we look at things like the schizophrenic "::" operator (haha I like that terminology), we have to ask: how should it have worked in the first place? :) --Jeremy On Wed, Apr 23, 2008 at 9:49 PM, David A. Black wrote: > Hi -- > > > > On Thu, 24 Apr 2008, Thomas Enebo wrote: > > > > David A. Black wrote: > > > > > Hi -- > > > > > > On Thu, 24 Apr 2008, Charles Oliver Nutter wrote: > > > > > > > > > > David A. Black wrote: > > > > > > > > > OK... but could you do something else? :-) I don't mean that > > > > > facetiously; I'm just not sure that having two ways to get at the > Java > > > > > class is worth having all the extra ::'s throughout so much Ruby > code. > > > > > But I don't know enough about the problem to know how it might have > > > > > played out if . and :: had been fully differentiated in Ruby. > > > > > > > > > > > > > You can't do this with dots: > > > > > > > > class java::lang::System > > > > end > > > > > > > > > > But that's an effect, rather than the cause, of the decisions taken > > > about :: and .. (Hard to end a sentence with .! :-) Maybe we're in too > > > deep for it to change, though. It might make more sense if I knew what > > > Matz had in mind with it originally (i.e., why have two > > > message-sending operators?). > > > > > Does that really matter in lieu of the fact that multiple people are using > this 'feature'? I think most software designers are surprised how people > end up using their software. It certainly could be done differently, but > class/modules only take colon2/3 which means we would need to do this over > multiple lines or need to expand definition of what can go after > class/module. > > > > I know what you're saying, but I am actually curious about the > origins. I don't know whether it really matters, in practical terms. I > guess it's always a judgment call how much the amount people use > something weighs against whether it's fundamentally something that > makes sense for the language. I can't help thinking that if :: had > been, all along, just for constant resolution, and . were the > universal way to send messages to objects, no one would be submitting > RCRs suggesting that they be semi-merged :-) Of course one can't turn > back the clock, though I don't think this change would be any more > radical than something like adding block-local variables and the > syntax changes that come with that. > > > > > David > > -- > Rails training from David A. Black and Ruby Power and Light: > INTRO TO RAILS June 9-12 Berlin > ADVANCING WITH RAILS June 16-19 Berlin > INTRO TO RAILS June 24-27 London (Skills Matter) > See http://www.rubypal.com for details and updates! > > -- http://jeremymcanally.com/ http://entp.com Read my books: Ruby in Practice (http://manning.com/mcanally/) My free Ruby e-book (http://humblelittlerubybook.com/) Or, my blogs: http://mrneighborly.com http://rubyinpractice.com