• 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: What is the purpose of static typing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the purpose of static typing?


  • Subject: Re: What is the purpose of static typing?
  • From: Marcel Weiher <email@hidden>
  • Date: Thu, 25 Jul 2002 09:51:15 +0200

On Thursday, July 25, 2002, at 03:24 Uhr, Richard Wolf wrote:

Additionally, as a rule of thumb, the more dynamic typing you use, the
more sluggish your user experience will become.

Whoa ... unless I'm reading my Objective C manual and misunderstanding it,

You aren't.

there -can't- be any -runtime- difference between objects statically and dynamically typed in source because all methods are dynamically bound to objects at runtime.

Exactly right.

The way I read that,

NSTextField *tf;
...
[ tf setStringValue: @"Some string" ];

and

id tf;
...
[ tf setStringValue: @"Some string" ];

are equally efficient and there is no way that one could be more efficient than the other.

At least not in Objective-C as we know it.

To the runtime, they are supposed to be exactly the same, right? Or, am I not reading the books correctly? I speak as a newbie.

You speak correctly.

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.

References: 
 >Re: What is the purpose of static typing? (From: Richard Wolf <email@hidden>)

  • Prev by Date: NSBeginAlertSheet and contextInfo
  • Next by Date: Re: What is the purpose of static typing?
  • Previous by thread: Re: What is the purpose of static typing?
  • Next by thread: Re: What is the purpose of static typing?
  • Index(es):
    • Date
    • Thread