Re: Initializing variable style question



On Nov 14, 6:03 pm, Eric Sosman <Eric.Sos...@xxxxxxx> wrote:


In this situation, the "useless" intialization to zero must in fact
be performed if the program is to operate as the JLS requires.  (Of
course, calling an overridable method from a constructor is firmly
in the Don't Do That realm.)

Wow. Thanks for that example which makes the point clear.

Phil
PS: I'm still a bit disapointed that my neither the javac nor the JIT
removed the self-assignments in my example, but then again, maybe they
are also necessary to guarantee execution by the specs.
.



Relevant Pages

  • Re: Converting constants-only interfaces to abstract classes
    ... zero wrote: ... The JLS doesn't, though. ... implies that correct usage of that class involves overriding some class ...
    (comp.lang.java.programmer)
  • Re: Formatted read question
    ... >>obtuse, even for a standard, sigh. ... >>but so is calling it zero. ... leading blanks are not significant. ...
    (comp.lang.fortran)
  • Re: Getting high on an Apple at $188
    ... a pea would be an infinitely larger size brain ... It's quality, ZERO, not quantity. ... ZERO now adopts the lost eddie tactic of calling his critics by his ...
    (comp.sys.mac.advocacy)
  • Re: Problem with CRecordset and CByteArray
    ... I'm having trouble with a CRecordset-derived class and a binary field I want to update. ... When opening a recordset it is giving me an assertion while calling RFX_Binary: it is calling ElementAtof my empty CByteArray object. ... Therefore, somehow, pODBCInfo->m_nPrecision is zero and thus the size of my array is always zero. ... I'm suspecting this is more a SQL Server issue than MFC... ...
    (microsoft.public.vc.mfc)
  • Re: Getting high on an Apple at $188
    ... Could it be that DELL's products suck? ... a pea would be an infinitely larger size ... It's quality, ZERO, not quantity. ... ZERO now adopts the lost eddie tactic of calling his critics by his ...
    (comp.sys.mac.advocacy)