From: gabriele renzi Date: 2004-09-04T21:50:15+09:00 Subject: Re: OK... :) question about hash and array literals David A. Black ha scritto: > Hi -- > > On Sat, 4 Sep 2004, Yukihiro Matsumoto wrote: > > >>Hi, >> >>In message "Re: OK... :) question about hash and array literals" >> on Sat, 4 Sep 2004 12:54:52 +0900, Hal Fulton writes: >> >>|Is there a method that does get called (I think not), or could >>|in theory such a thing be implemented? >> >>Not planned, just because changing semantics of literals are too >>dangerous, as dangerous as macros for my eyes. > > > This is just a thought (not even an "idea" :-) but what about a > %-style constructor: > > %H{ k1 => v1, k2 => v2, ... } > please no. This is just my very little unvaluable opinion, but %-stuff literals are one of the few things I don't like about ruby. Nothing is telling me what they mean, It's something a user can't have control over and there are subtle differencies beetween one and another that are just... well.. _too_ subtle. But as I write I'm getting the idea you're suggesting overridable % constructors? If that is the suggestion.. well, interesting :)