Hello.

When developing with objects in OCaml, I'm quite often faced with polymorphic methods.

Such as:

class myobject = object
  method id x = x
end

Sometimes you have many methods that you're tinkling with, and the compiler keeps saying to you that 'a is inbound in this class declaration.

I'm therefore wondering if it would be a good idea to have a keyword 'polymorphic', and one would write

class myobject = object
  polymorphic method id x = x
end

The polymorphic keyword would be a hint that the method is polymorphic and that there is no need to look at the class' type parameters.

--
     Guillaume Yziquel
http://yziquel.homelinux.org/

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to