Einzelnen Beitrag anzeigen

Der schöne Günther

Registriert seit: 6. Mär 2013
6.176 Beiträge
 
Delphi 10 Seattle Enterprise
 
#58

AW: Neuer FixInsight ist da!

  Alt 2. Jul 2015, 12:29
even though it might be good practice(?) I never call them in that circumstance.
I always explicitly derive from TObject and call the (empty) inherited constructor. Java, for example, is different: It implicitly calls the inherited parameterless constructor (if there's any). Otherwise, it's a compile time error.

Another reason is that it often happened to me that I omitted the (then redundant) call to the super constructor but later decided to derive the class from something other than TObject . Then, it's easy to miss adding the call to the inherited constructor back in. (FixInsight to the rescue! )
  Mit Zitat antworten Zitat