Subject: Re: [sv-ec] Section 11 - Classes
From: Neil Korpusik (Neil.Korpusik@eng.sun.com)
Date: Thu Feb 06 2003 - 17:30:18 PST
Both of the keywords "super" and "extends" come from the
Java language. Java doesn't support multiple inheritance.
Neil
> Date: Thu, 6 Feb 2003 16:57:44 -0800 (PST)
> From: "Kevin Cameron x3251" <Kevin.Cameron@nsc.com>
> To: sv-ec@eda.org, stefen@boyd.com
> Subject: Re: [sv-ec] Section 11 - Classes
> X-WSS-ID: 125DDB00123466-01-01
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
>
> > From: "Stefen Boyd" <stefen@boyd.com>
> > Subject: [sv-ec] Section 11 - Classes
> >
> > Stu editorially noted that he didn't want global
> > keywords new, this or super. I would agree that
> > having these be new global keywords is a problem.
> > But in this case, unless the language experts can
> > provide a slick syntax that isn't confusing, I'm
> > inclined to want these keywords... so it seems
> > that we need to consider Stu's `compatibility
> > proposal if there isn't a friendly syntactical
> > way around this. I definitely don't want to go into
> > contortions.
> >
> > Stefen
>
> Is "super" from Java? - C++ doesn't have it, you just
> use the base class name with "::" e.g.:
>
> class foo {
> public:
> int data;
> };
>
> class bar : public foo {
> public:
> int data; // masks foo
> int foo_data() {return foo::data;}; // Gets foo value
> };
>
> It has the advantage over "super" that it will refer
> to any inherited class - not just the immediate parent -
> and it only introduces the operator "::" instead of a
> keyword.
>
> If we use "::" instead of "super", but someone is desperate
> for the exact functionality of "super" we could use:
>
> ^::
>
> Kev.
>
This archive was generated by hypermail 2b28 : Thu Feb 06 2003 - 17:31:02 PST