Create a generic (unknown) instance


#1

I’d like to do something like this

class ['a] stack  = object
     method create () : 'a = new 'a
end 

is that possible?


#2

Nope, new expects a class name. A class is not a type, it is a blueprint for making objects.