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: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Interface with implied Constructor Date: Sat, 20 Jul 2013 09:08:20 -0400 Organization: A noiseless patient Spider Lines: 29 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: Sat, 20 Jul 2013 13:02:16 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="0d73d8cc209bff1c6395088b400d0605"; logging-data="19336"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SpuwLWUPQCPFnBbC6gP4q" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 In-Reply-To: Cancel-Lock: sha1:sk8ynOhBkLVA9JxEXutO1PINWrs= Xref: csiph.com comp.lang.java.programmer:24774 On 7/20/2013 12:42 AM, Richard Maher wrote: > On 7/20/2013 7:46 AM, Arved Sandstrom wrote: >>[...] >> But like I said I don't think much of any system that attempts to >> mandate how a class builds itself. I always figured that was up to the >> class itself. > > I didn't say "mandated" and I'm not sure anyone else did besides yourself. > > In the case of my Applet where I'm controlling the mainline (via and > init() method ironically enough). The user-supplied class, for getting > things like username/password etc and optionally displaying a console > window, is going to be pretty specialized. However, if a generic(ish) > class you have happens to provide an opportunity for code re-use then > that's peachy. The closest I get to "mandatory" is to say "Regardless of > any other constructors, I require you to provide either an empty > constructor or one which takes a Tier3Ambience object as its only > parameter". So: Not "mandatory," but "required." Subtle. Is this like the United States' "voluntary" income tax payments? (You don't *have* to pay the tax, but if you don't the government may garnish your wages, seize your property, and/or put you in jail. The choice is entirely yours, to make as freely as you please.) -- Eric Sosman esosman@comcast-dot-net.invalid