caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* typing of a class
@ 2000-03-07 13:12 David Chemouil
  2000-03-08 19:00 ` John Prevost
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: David Chemouil @ 2000-03-07 13:12 UTC (permalink / raw)
  To: caml-list


Hi,


I've been using the OO features of Caml these past days, and soon
observed a behavior of the typing system that I don't understand. Here
is a simplified version of my problem:

# class a (arg : a -> b) = object(self)
    val ob = arg self
  end
  and b = object
  end;;

The instance variable self
cannot be accessed from the definition of another instance variable


I don't understand why it is forbidden for an object to pass itself to
another one (which is possible in Java or Eiffel for example). Could
someone explain me? Or is there a paper talking about this?


thanks,

dc


-- 
David Chemouil [mailto:chemouil@enseeiht.fr] [mobile: 06 84 16 26 65]

Laboratoire d'informatique et de mathématiques appliquées (IRIT-INPT)



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-03-17 10:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-07 13:12 typing of a class David Chemouil
2000-03-08 19:00 ` John Prevost
2000-03-09  0:52 ` Benoit Deboursetty
2000-03-09 20:25 ` Didier Remy
2000-03-10  8:33   ` Xavier Leroy
2000-03-16 13:34     ` thierry BRAVIER

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).