• 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: NSCalendarDate from plist
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCalendarDate from plist


  • Subject: Re: NSCalendarDate from plist
  • From: "Erik M. Buck" <email@hidden>
  • Date: Mon, 26 Nov 2001 00:15:58 -0600
  • Organization: EMB & Assocites Inc.

> I'd still like to be using a language that could express this correctly,
> though (although I'm not really a language lawyer). Using id for a
> return type seems like sort of a sledgehammer approach...
>

Eiffel tried to get this right. There are legendary wars on the news groups
debating if Eiffel got it right or not. This is one of the hardest problems
with strong static compile-time type systems.

Using id is perfectly sensible and elegant in a weak dynamic run-time typed
language like Objective-C. Early versions of Objective-C ONLY had the id
type and great programs were written. Using static types in Objective-C
merely provides hints to the compiler. All object and message types are
dynamic and resolved at run-time no matter what you type in. Hell, the
ultimate receiver of a message may not even be in the same process as the
sender and there is no way at compile time to know one way or the other! It
is impossible for the compiler to verify or require type consistency in
messaging.

id is the light weight "feather" solution that is very elegant in a weak
dynamic run-time typed language.
Introducing all of the issues with covariant/contravariant type signatures
and ridged compile-time type checking is the heavy weight "sledgehammer"
approach.

Not everyone likes flexible languages like Smalltalk and Objective-C. That
is OK, but if you are using Objective-C, you should not complain about its
very deliberate features. Cocoa would not exist without them.


References: 
 >Re: NSCalendarDate from plist (From: Kurt Revis <email@hidden>)

  • Prev by Date: Re: Controller knowing about an event
  • Next by Date: Programatically changing the spelling language
  • Previous by thread: Re: NSCalendarDate from plist
  • Next by thread: init-ing something one did not alloc
  • Index(es):
    • Date
    • Thread