Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: vocabulary Date: Sun, 27 Apr 2014 22:30:09 +0000 (UTC) Organization: A noiseless patient Spider Lines: 37 Message-ID: References: <8l0pl95jubrn24j0tgnqcc21arhkii83ko@4ax.com> <535caadc$0$6712$9b4e6d93@newsspool2.arcor-online.net> <535cda24$0$6715$9b4e6d93@newsspool2.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 27 Apr 2014 22:30:09 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="13015"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+U6pixBYbGP6kBLEd03lBjlkSL1ZNizwY=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:bdMgWEchfrwMZJQf8YWNqmA/8t8= Xref: csiph.com comp.lang.java.programmer:28278 On Sun, 27 Apr 2014 12:52:38 -0700, Roedy Green wrote: > On Sun, 27 Apr 2014 20:23:03 +1000, "Qu0ll" > wrote, quoted or indirectly quoted someone who said : > >>He refers to "class or interface" which are most definitely types, not >>instances surely? > > In the sense I am looking for a generic term, > a class is a some source code bracketed with class xxx { } > an interface is some source code bracketed with interface xxx { }. > > One way of looking at it is it is a related group of methods. > > In many cases whatever you can do with a class reference you can do with > an interface reference. You should not have spell out "class or > interface" reference. In that case reference does mean both by default. > > If I were designing Java syntax from scratch, perhaps I would have would > made interface a modifier, e.g. interface class cf. abstract class. > Then we would not have the awkward implements vs extends distinction. > > I wonder if we could deprecate extends and make it a synonym for > implements. If the defined is an interface, it implies the extends > meaning. It seems to me that the only reason Java has both Abstract Class and Interface definitions is to sidestep having to implement multiple inheritance: if multiple inheritance was supported there would be no difference between them. That said, I seldom use Interface definitions but find the distinction can be useful. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |