From: Sean O'Halpin Date: 2005-11-25T04:29:49+09:00 Subject: Re: Legal symbol names and generics On 11/24/05, John Lam wrote: > Yes - this is by far the most straightforward way of making this happen. > While I don't like "magic method names" like .specialize(), I really don't > think there's a way of hacking type information into Ruby's syntax :( And I > need to preserve using [] as well ... > > I'll see what I can't do to hack these ideas into the rewrite of my bridge. > > Cheers, > -John > http://www.iunknown.com > You could use a factory method - method names and constants are disjoint. For example, def ChannelFactory(type_info) ChannelFactory.specialise(type_info) end channel = ChannelFactory(IOutputChannel).new Regards, Sean