• 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: "static" typing (Learning Cocoa Chapter 13)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "static" typing (Learning Cocoa Chapter 13)


  • Subject: Re: "static" typing (Learning Cocoa Chapter 13)
  • From: jgo <email@hidden>
  • Date: Sat, 29 Sep 2001 05:04:56 -0700

> Ondra Cada <email@hidden> 2001-09-22 22:58:25 +0200
>> Chris Rudolph wrote at Fri, 2001-09-21 15:07:43 -0700:
>> This simple and more elegant solution is to NOT declare multiple
>> variables on the same line.
>
> It's not that elegant, actually. It's nice to have a code of
> any method fit to the screen for obvious reasons; the
> difference between
>
> NSString *s1,*s2,*name=[a objectAtIndex:0],*a,*b,*val=[d objectForKey:key];
>
> and the corresponding six lines is tremendous, and definitely
> in favour of the format above.

C'mon! You're pullin' our legs. Talk about maximizing obfuscation!

NSSTring * s1;
NSString * s2;
NSString * a;
NSString * b;
NSString * name = [a objectAtIndex:0];
NSString * val = [d objectForKey:key];

is much clearer.

John G. Otto, Eagle Scout, Knight, Cybernetic Praxeologist
Existence, Consciousness, Identity, Life, Liberty, Property, Privacy, Justice


  • Follow-Ups:
    • Re: "static" typing (Learning Cocoa Chapter 13)
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: NSArray behavior changes?
  • Next by Date: Re: NSArray behavior changes?
  • Previous by thread: Re: Drag a JPEG from Finder to Cocoa
  • Next by thread: Re: "static" typing (Learning Cocoa Chapter 13)
  • Index(es):
    • Date
    • Thread