Re: [Vala] Generics: constraints and 'new T ()' on type parameters?

2009-02-26 Thread Christian Hergert
I wrote a datamapper (rather than an ORM) a while back in Vala. I don't think anyone is really using it, but it might be an example for various problems or questions you run into. http://git.dronelabs.com/git?p=users/chris/godm.git;a=summary It does let you do some neat stuff (and creates

Re: [Vala] Generics: constraints and 'new T ()' on type parameters?

2009-02-26 Thread Thomas Chust
2009-02-27 Sam Danielson samdaniel...@gmail.com: [...] Ideally I would think a Factory T should be able to return new T's but I can't figure out how to do this. [...] Hello, as far as I know, the Vala compiler performs type erasure for generic types. This means that the concrete type

Re: [Vala] Generics: constraints and 'new T ()' on type parameters?

2009-02-26 Thread Yu Feng
Hi Sam, On Thu, 2009-02-26 at 19:52 -0500, Sam Danielson wrote: I'm writing some ORM where a database view is wrapped in a factory object that produces records. Ideally I would think a Factory T should be able to return new T's but I can't figure out how to do this. The work around is to