Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Interface with implied Constructor Date: Fri, 19 Jul 2013 18:10:56 -0400 Organization: A noiseless patient Spider Lines: 19 Message-ID: References: <925adeb1-65b5-4a50-86a8-4f04784f8da0@googlegroups.com> <5CiGt.85244$ny.24125@fx14.iad> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 19 Jul 2013 22:04:54 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="0d73d8cc209bff1c6395088b400d0605"; logging-data="819"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18F+Ux3e6VIqIZ+OdVjgym2" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 In-Reply-To: <5CiGt.85244$ny.24125@fx14.iad> Cancel-Lock: sha1:pvwjTKGCTSg8i6joVeyHg2JmJR4= Xref: csiph.com comp.lang.java.programmer:24765 On 7/19/2013 5:56 PM, Arved Sandstrom wrote: > [...] > Which is one reason you use abstract classes. If you want to supply > constructors, implement them, and put them in an abstract class. It's > the right place: in my continuing opinion ctors are an implementation > detail. Uhm, sorry, I don't get it. Such a constructor would only be callable from the constructor of a subclass, and there's still nothing to require that the subclass provide any particular style of constructor. (As mentioned elsethread I don't think interface-mandated constructors would be useful. I'm just wondering how you'd use abstract classes to achieve the not-so-useful effect.) -- Eric Sosman esosman@comcast-dot-net.invalid