Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!news-transit.tcx.org.uk!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Daniele Futtorovic Newsgroups: comp.lang.java.programmer Subject: Re: Enums: Properties vs. Methods Date: Tue, 29 Mar 2011 23:25:07 +0200 Organization: A noiseless patient Spider Lines: 24 Message-ID: References: <2f38bb8e-9a8d-4464-ad3d-b9ce0b557219@e21g2000yqe.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 29 Mar 2011 21:25:04 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="x1ayPUl1Dd83Eixaqp6srw"; logging-data="25996"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18x5P4k4RMaVzGQsW7gwUxD" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: Cancel-Lock: sha1:93D3DFI2BGddbH3m+Ga4SvgXseE= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2563 On 29/03/2011 23:08, Lew allegedly wrote: > Daniele Futtorovic wrote: >> Wat? Which job? Which hammer? There's no difference between the >> alternatives >> with respects to what their methods are like. Leaving convenience and >> maintenance aside, the only difference between both is that in the >> first one >> (without fields), the instructions are probably easier to inline. > > That's confusing. The first example presented was with fields, and the > second one was without fields. Shit, sorry. s/first/second/ > Regardless, the instructions are just as easy to inline either way. One > returns a constant, the other a constant variable. For all purposes, yeah. I would however expect the one with the constant to be marginally easier, as it requires no analysis of the field. -- DF. An escaped convict once said to me: "Alcatraz is the place to be"