Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: Enums: Properties vs. Methods Date: Tue, 29 Mar 2011 17:08:12 -0400 Organization: albasani.net Lines: 16 Message-ID: References: <2f38bb8e-9a8d-4464-ad3d-b9ce0b557219@e21g2000yqe.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net waq1B1XW4K/Bwn/bvjUh1jtPvoeuosh+HnQW1usXsu4em4ooNOvepA8aN1gfEf522GRxlOYk37/RUjbyD2i+UalzMukjjq8gKUvENFsKC0bc3LlOpb7ju+AgPdMlkdLU NNTP-Posting-Date: Tue, 29 Mar 2011 21:08:05 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="viO+ln4os3rB9OJYCTqKUfbHLXkB5l0A4Jv+q+sUtkf3cshemtpO8a2yee4aieZWv1QgQ81mK3aU59LURv0nRBVTKN/cVYLRAk8OM4gndYhXRupkk6YmjJFzv3cd/gUq"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 In-Reply-To: Cancel-Lock: sha1:NDKGzfzTsaIsSwd+8t5XLE2Qz+o= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2562 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. Regardless, the instructions are just as easy to inline either way. One returns a constant, the other a constant variable. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg