Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

interface vs. extending


  • From: boazbk@xxxxxxxxxxxxxx (Boaz Barak)
  • Subject: interface vs. extending
  • Date: Sun, 4 Oct 1998 15:17:49 +0200

"The Java Programming Language" 2nd ed. remarks that the reason Dictionary
is an abstract class and not an interface is that it predated the addition
of interfaces to Java, but perhaps both things happened before the first
public alpha release.

From: Ernest Friedman-Hill >
> Interfaces have most certainly been part of Java since its first
> public alpha release. No version of Java did not have them.
>
> I think Boaz Barak wrote:
> >
> >
> > > "Expensive" in what regard? There's *no* run-time hit involved here in
> > > either, since all methods in Java are virtual, anyway, and the
> > compile-time
> > > hit is usually pretty minimal, as well, so where's the "expense" we're
> > > supposed to be measuring against?
> >
> > I think than in older JVMs interface method calls were slower, maybe
because
> > a single inheritance virtual method table is easier to implement (and
maybe
> > because interfaces were added in Java 1.1). I think that this problem no
> > longer exists in hotspot.
> >
> >
> > Boaz Barak
> > boazbk@xxxxxxxxxxxxxx
> > (also: boazbk@xxxxxxxxxxxxxx)
> >
> >
> > Boaz Barak
> > boazbk@xxxxxxxxxxxxxx
> > (also: boazbk@xxxxxxxxxxxxxx)
> >
> >
> >
> > ---
> > To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
> > To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx
> >
> >
>
>
> ---------------------------------------------------------
> Ernest Friedman-Hill
> Distributed Systems Research        Phone: (925) 294-2154
> Sandia National Labs                FAX:   (925) 294-2234
> Org. 8920, MS 9012                  ejfried@xxxxxxxxxxxxx
> PO Box 969                  http://herzberg.ca.sandia.gov
> Livermore, CA 94550
>


---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx