advertisement

Article:
  The Objective-C Language
Subject:   + initialize compared to constructors in C++
Date:   2001-05-05 22:28:14
From:   gskluzacek
Response to: + initialize

I'm fairly familiar with C++'s constructors, that get called immediately (and implicitly) when a object is created. Why in the Objective-C code do you have to explicitly call the +initialize method? I would think that this would allow errors to occur in unexperienced programmer's code. I would think that C++'s way of calling the constructor whenever a new object is created would be preferable. Just my uninformed opinion, as I am just learning Objective-C myself.

1 to 1 of 1
  1. + initialize and - init /not/ compared to constructors in C++
    2001-05-06 16:55:40  halliday [View]

    • Michael Beam photo + initialize and - init /not/ compared to constructors in C++
      2001-05-07 10:45:12  Michael Beam | O'Reilly Author [View]

      • + initialize and - init /not/ compared to constructors in C++
        2001-05-07 21:08:18  gskluzacek [View]

        • Michael Beam photo + initialize and - init /not/ compared to constructors in C++
          2001-05-08 12:27:34  Michael Beam | O'Reilly Author [View]

1 to 1 of 1