• 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: Future Objective-C changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Future Objective-C changes


  • Subject: Re: Future Objective-C changes
  • From: Marcel Weiher <email@hidden>
  • Date: Wed, 21 May 2003 16:51:02 +0200

Actually I'm "defining" a local variable,

Gosh, this sure looks like a declaration to me, and just strengthens my point. How can I tell the difference by looking at the code? How is the code intention-revealing?

void foo()
{
//These are all defining local variables:
int i;
float f;
MyClass c;
}

Well, I googled a bit. Let's see what Bell Labs has to say about this:

http://cm.bell-labs.com/cm/cs/who/dmr/chist.html

------ snip -----
Embryonic C


NB existed so briefly that no full description of it was written. It supplied the types int and char, arrays of them, and pointers to them, declared in a style typified by
int i, j;
char c, d;
int iarray[10];
int ipointer[];
char carray[10];
char cpointer[];
------ snip -----

Notice the use of the term "declared". "Defined" is not used in this context at all.

The C-FAQ also uses the term "declare" for (local) variables, with "define" used only in the context of global variables (and pre-processor macros).

http://www.faqs.org/faqs/C-faq/abridged/

If you are going to be anal about terminology, I suggest you get it right first. I have never ever heard anyone refer to "defining" a local variable, though that doesn't mean it has never happened.

Grmph,

Marcel

--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
_______________________________________________
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: Future Objective-C changes
      • From: Andy Lee <email@hidden>
    • Re: Future Objective-C changes
      • From: "Clark S. Cox III" <email@hidden>
    • Re: Future Objective-C changes
      • From: Marco Scheurer <email@hidden>
References: 
 >Re: Future Objective-C changes (From: "Clark S. Cox III" <email@hidden>)

  • Prev by Date: check if process is running
  • Next by Date: Re: Future Objective-C changes
  • Previous by thread: Re: Future Objective-C changes
  • Next by thread: Re: Future Objective-C changes
  • Index(es):
    • Date
    • Thread