From: Pit Capitain Date: 2005-11-25T04:06:46+09:00 Subject: Re: Legal symbol names and generics John Lam schrieb: > The problem here is that ChannelFactory is a CLR generic type, which is > specialized at run-time. So I'm really looking for a way to pass type > parameter(s) to the type at construction time. So while I like your first > example, I'm not sure how I could extend it to cover an arbitrary number of > type parameters. > > Here's a simple example (again with the illegal angle bracket syntax): > > dict = Dictionary.new As Gary already suggested, I'd use a [] method: def Dictionary.[]( *types ) # return appropriate class end Then you can call it like dict = Dictionary[Integer, String].new Regards, Pit