Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #2799

Re: Enums: Properties vs. Methods

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Enums: Properties vs. Methods
Date Sun, 03 Apr 2011 13:14:18 +0200
Lines 31
Message-ID <8vr34cF6ctU1@mid.individual.net> (permalink)
References <2f38bb8e-9a8d-4464-ad3d-b9ce0b557219@e21g2000yqe.googlegroups.com> <imsutq$115$1@news.albasani.net> <8vh9efFg01U1@mid.individual.net> <fba37755-efd7-4ff7-a6a7-ee6c48cf7590@hg8g2000vbb.googlegroups.com> <0187eb75-7f36-4254-9711-f63ff480f62e@j13g2000yqj.googlegroups.com> <in1sos$603$1@news.albasani.net> <1f76f26d-4b21-4a26-92b4-bb6553b9cad6@f30g2000yqa.googlegroups.com> <in3chd$g2v$1@news.albasani.net> <8voa70Fuk3U1@mid.individual.net> <in7bsd$p0n$2@news.albasani.net>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding quoted-printable
X-Trace individual.net 3pvhOs9GGb4TKdpuVzP+MAXzqQSw0UIE/MSnfIIFqAxlywvXs=
Cancel-Lock sha1:wFUoVNpsu1C77BA9X5d9ACHjFrk=
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9
In-Reply-To <in7bsd$p0n$2@news.albasani.net>
X-Antivirus avast! (VPS 110403-0, 03.04.2011), Outbound message
X-Antivirus-Status Clean
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2799

Show key headers only | View raw


On 02.04.2011 16:29, Lew wrote:
> Robert Klemme wrote:
>> Lew wrote:
>>> Robert Klemme wrote:
>>>> Lew wrote:
>>>>> Start here: JLS, ยง17.5.3, as I cited earlier.
>>>>
>>>> It seems that is not a good place to start (see other postings). :-)
>>>
>>> Indeed.
>>
>> What now?
>
> Do you mean how do we distinguish the two alternatives now?

I rather meant what is the assessment of the community about possible 
optimizations applied by the JVM to both approaches?  My personal 
opinion at this point is that the "properties" approach might be more 
efficient since getter methods can be inlined (there is just one class 
so there are not multiple variants for e.isOpen() as opposed to having 
different classes).

Cheers

	robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Enums: Properties vs. Methods Robert Klemme <shortcutter@googlemail.com> - 2011-03-29 08:18 -0700
  Re: Enums: Properties vs. Methods Lew <noone@lewscanon.com> - 2011-03-29 11:47 -0400
    Re: Enums: Properties vs. Methods Robert Klemme <shortcutter@googlemail.com> - 2011-03-30 20:00 +0200
      Re: Enums: Properties vs. Methods Lew <lew@lewscanon.com> - 2011-03-30 13:17 -0700
        Re: Enums: Properties vs. Methods Robert Klemme <shortcutter@googlemail.com> - 2011-03-31 00:48 -0700
          Re: Enums: Properties vs. Methods Lew <noone@lewscanon.com> - 2011-03-31 08:41 -0400
            Re: Enums: Properties vs. Methods Robert Klemme <shortcutter@googlemail.com> - 2011-03-31 08:26 -0700
              Re: Enums: Properties vs. Methods Lew <noone@lewscanon.com> - 2011-03-31 22:16 -0400
                Re: Enums: Properties vs. Methods Robert Klemme <shortcutter@googlemail.com> - 2011-04-02 11:56 +0200
                Re: Enums: Properties vs. Methods Lew <noone@lewscanon.com> - 2011-04-02 10:29 -0400
                Re: Enums: Properties vs. Methods Robert Klemme <shortcutter@googlemail.com> - 2011-04-03 13:14 +0200
  Re: Enums: Properties vs. Methods markspace <-@.> - 2011-03-29 09:26 -0700
    Re: Enums: Properties vs. Methods Robert Klemme <shortcutter@googlemail.com> - 2011-03-30 20:06 +0200
      Re: Enums: Properties vs. Methods markspace <-@.> - 2011-03-30 12:40 -0700
        Re: Enums: Properties vs. Methods Robert Klemme <shortcutter@googlemail.com> - 2011-03-31 00:38 -0700
  Re: Enums: Properties vs. Methods Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-03-29 19:03 +0200
    Re: Enums: Properties vs. Methods Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-03-29 19:04 +0200
  Re: Enums: Properties vs. Methods Roedy Green <see_website@mindprod.com.invalid> - 2011-03-29 12:49 -0700
  Re: Enums: Properties vs. Methods Roedy Green <see_website@mindprod.com.invalid> - 2011-03-29 12:52 -0700
    Re: Enums: Properties vs. Methods Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-03-29 22:45 +0200
      Re: Enums: Properties vs. Methods Lew <noone@lewscanon.com> - 2011-03-29 17:08 -0400
        Re: Enums: Properties vs. Methods Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-03-29 23:25 +0200
          Re: Enums: Properties vs. Methods Lew <noone@lewscanon.com> - 2011-03-29 19:05 -0400
            Re: Enums: Properties vs. Methods Lew <noone@lewscanon.com> - 2011-03-29 19:40 -0400
              Re: Enums: Properties vs. Methods Robert Klemme <shortcutter@googlemail.com> - 2011-03-31 02:57 -0700
                Re: Enums: Properties vs. Methods Lew <noone@lewscanon.com> - 2011-03-31 08:52 -0400
                Re: Enums: Properties vs. Methods Lew <noone@lewscanon.com> - 2011-03-31 08:54 -0400
            Re: Enums: Properties vs. Methods Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-03-30 18:40 +0200
              Re: Enums: Properties vs. Methods Lew <lew@lewscanon.com> - 2011-03-30 10:33 -0700
                Re: Enums: Properties vs. Methods Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-03-30 20:43 +0200
                Re: Enums: Properties vs. Methods Lew <lew@lewscanon.com> - 2011-03-30 13:20 -0700
                Re: Enums: Properties vs. Methods Lew <noone@lewscanon.com> - 2011-03-31 08:55 -0400
  Re: Enums: Properties vs. Methods Wanja Gayk <brixomatic@yahoo.com> - 2011-04-02 11:23 +0200
    Re: Enums: Properties vs. Methods Lew <noone@lewscanon.com> - 2011-04-02 10:36 -0400
      Re: Enums: Properties vs. Methods Wanja Gayk <brixomatic@yahoo.com> - 2011-04-02 21:20 +0200

csiph-web