Re: Defining a constructor in an Interface
- From: Lee Fesperman <firstsql@xxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 08:39:25 GMT
Thomas Weidenfeller wrote:
>
> Chris Smith wrote:
> > That said, I don't think there's ever a good excuse for requiring a
> > constructor that takes parameters.
>
> Well, such a requirement, or lets better say nice-to-have feature, can
> come up when you want to have a 1:1 translation of your design model to
> an implementation. I perfectly understand (at least I think so) why
> things are as they are, but it would be nice to have it otherwise.
Nope, it's still a bad idea. A decent implementation is likely to want additional
arguments to its constructor. It pretty much kills multiple inheritance of interfaces
because of conflicting constructor requirements. If your implementation wishes to extend
another class with specific constructor requirements, you have no recourse.
There is more. Google for previous discussions on this.
--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
.
- Follow-Ups:
- Re: Defining a constructor in an Interface
- From: Raymond DeCampo
- Re: Defining a constructor in an Interface
- From: Thomas Weidenfeller
- Re: Defining a constructor in an Interface
- References:
- Defining a constructor in an Interface
- From: Chris Berg
- Re: Defining a constructor in an Interface
- From: Chris Smith
- Re: Defining a constructor in an Interface
- From: Thomas Weidenfeller
- Defining a constructor in an Interface
- Prev by Date: Re: Global Rename heaven
- Next by Date: paging in jsp
- Previous by thread: Re: Defining a constructor in an Interface
- Next by thread: Re: Defining a constructor in an Interface
- Index(es):
Relevant Pages
|