• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: "Designated Initializer" pattern
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Designated Initializer" pattern


  • Subject: Re: "Designated Initializer" pattern
  • From: Reed Hedges <email@hidden>
  • Date: Tue, 16 Mar 2004 18:41:58 -0500

Um, "structured programming" ??

Maybe "wrapper functions" if you're being fancy?

Do I misunderstand what exactly you mean...

int foo(int x, int y, int z, bool flag) {
... ...
}

int bar(int x) {
return foo(x, 0, 0, 0, false);
}

int baz(int y) {
return foo(23, y, 42, true);
}

right?

Pretty basic stuff, probably no one has formalized it as a pattern...


On Tuesday, March 16, 2004, at 04:32 PM, Michael Rothwell wrote:

Is there a more generic name for code that follows the "Designated
Initializer" pattern? This pattern -- one "master" function that simpler,
related functions call -- can be used for functions that are not
initializers. Is there a more generic name for the pattern than
"Designated Initializer?"

Something like "Designated Handler?"
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: "Designated Initializer" pattern
      • From: Michael Rothwell <email@hidden>
    • Re: "Designated Initializer" pattern
      • From: Ondra Cada <email@hidden>
References: 
 >"Designated Initializer" pattern (From: "Michael Rothwell" <email@hidden>)

  • Prev by Date: Re: "Designated Initializer" pattern
  • Next by Date: Re: "Designated Initializer" pattern
  • Previous by thread: Re: "Designated Initializer" pattern
  • Next by thread: Re: "Designated Initializer" pattern
  • Index(es):
    • Date
    • Thread