News for hackers. Stuff that matters.
Re:Poll: What's Your Favorite Programming Language? by gjulianm on Saturday March 24, 2012 @07:40AM (#3749118)
I don't know if I misunderstanding you, but you can indeed specify class Something<T> where T : new Check this out: http://msdn.microsoft.com/en-us/library/d5x73970.aspx

And about numerical types, I agree that would be great to have a base class "Number" for double, int, etc. But meanwhile you can use this trick: http://stackoverflow.com/questions/3329576/generic-constrain...

Re:Poll: What's Your Favorite Programming Language? by noblethrasher on Saturday March 24, 2012 @12:44PM (#3749822)
Right now you can only specify that a type must have a paramerterless public constructor. He or she wants to be a le to specify (presumably) arbitrary constructors (or at least a copy constructor).