From: Jerome Vouillon <vouillon@pauillac.inria.fr>
To: skaller <skaller@maxtal.com.au>
Subject: Re: Can someone explain?
Date: Tue, 5 Oct 1999 11:43:03 +0200 [thread overview]
Message-ID: <19991005114303.55235@pauillac.inria.fr> (raw)
In-Reply-To: <37F930D0.6547CE0F@maxtal.com.au>; from skaller on Tue, Oct 05, 1999 at 08:57:20AM +1000
On Tue, Oct 05, 1999 at 08:57:20AM +1000, skaller wrote:
> Pierre Weis wrote:
> >
> > > Is there a way to access a value of a class instance?
> > > If so, what is the syntax? If not, what is the purpose
> > > of allowing 'val' bindings in class declarations in module
> > > signatures?
> >
> > The only way to access a value of a class instance is via method
> > invocation: you have to define a method that returns the value.
>
> Thanks, but you have not answered the real question here:
> WHY are the values present in the interface when they are not accessible
> via the interface?
>
> > > Similarly, what is the purpose of allowing 'virtual'
> > > methods in class types and class declarations in
> > > module signatures?
> >
> > Virtual methods are methods that are declared but not implemented:
> > sub-classes must define them.
>
> Again, I knew that, the real question is WHY this information
> is in the _interface_??
This information is in the interface because a class declaration can
also be used for inheritance, and a subclass can access the instance
variables of its parent and provide an implementation for the
virtual methods.
-- Jérôme
next prev parent reply other threads:[~1999-10-05 19:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-09 16:34 strange behavior of the object type-checker Pierre Boulet
1999-09-09 19:43 ` Jerome Vouillon
1999-09-28 18:56 ` Can someone explain? skaller
1999-10-04 8:23 ` Pierre Weis
1999-10-04 22:57 ` skaller
1999-10-05 9:43 ` Jerome Vouillon [this message]
1999-10-05 19:35 ` Gerd Stolpmann
1999-10-06 9:42 ` skaller
1999-10-08 0:17 ` Problem of coercion in recursive class definitions Peter Schrammel
1999-10-05 21:42 ` Can someone explain? Lyn A Headley
1999-10-06 10:17 ` skaller
1999-10-13 19:16 Juergen Pfitzenmaier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19991005114303.55235@pauillac.inria.fr \
--to=vouillon@pauillac.inria.fr \
--cc=skaller@maxtal.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox