• 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: Objective-C and it's future
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C and it's future


  • Subject: Re: Objective-C and it's future
  • From: Robert Walker <email@hidden>
  • Date: Fri, 7 Jul 2006 20:12:49 -0400

Very well put Charlton. I completely agree. The "id" type declaration is one of the most brilliant, powerful, and flexible design solutions I've seen in any language. I don't think of Obj-C as being "weakly-typed," it's actually "dynamically-typed." There is a big difference between those two concepts.

To me it's just another trade-off that influences the design of the language. The more statically typed a language becomes, the more flexibility that the developer loses. It's my opinion that Obj-C has the best balance of any language that I've had the pleasure of using. Oh and by the way my primary programming language is Java. But the more Obj-C I learn, the more I understand the power of Obj- C's dynamism.

On Jul 7, 2006, at 7:55 PM, Charlton Wilbur wrote:


On Jul 7, 2006, at 7:33 PM, Thomas Davie wrote:

The most basic extension of the type system I can think of is to allow something akin to generics, or ADTs to allow us to specify such things as what type of object an array contains.

Dynamic typing means you don't *need* Java-style generics or C++- style templates -- they are, after all, an attempt to give static typing the flexibility of dynamic typing. Java needs generics so that the compiler can determine what type an object is; Objective-C punts the decision to runtime. This is not a mistake, but an intentional design decision; the things that prevent you from doing stupid things often also prevent you from doing brilliant things.


(Some might say -- and I am among them -- that C++'s inisistence on static typing, and on all type decisions being made at compile- time, is its single greatest design flaw. And Java, which could have followed Objective-C's lead, followed in C++'s footsteps instead.)

To paraphrase a very wise man, if you want C++ (or Java), you know where to find it.

On the other hand, I wouldn't mind explicit support in the language for pre- and post-conditions, invariants, and other constraints, so that the compiler and runtime could correctly infer that a type mismatch had occurred.

So questions here really are (a) is there a more appropriate place to post this, (b) opinions on Objective-C's type system.

(a) Probably. I'd recommend comp.lang.objective-c, if you can manage to ignore a particularly egregious troll.


(b) Dynamic typing works well for this particular problem domain. I don't see any real advantage to making the typing static except reassuring people who aren't familiar with the Objective-C mindset, and compromising one of Objective-C's strengths in order to do so.

Charlton


--
Charlton Wilbur
email@hidden_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com


This email sent to email@hidden

-- Robert Walker email@hidden

There are 10 types of people in the world, those who count in binary, and those who don't.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Re: Objective-C and it's future
      • From: "Shawn Erickson" <email@hidden>
References: 
 >Objective-C and it's future (From: Thomas Davie <email@hidden>)
 >Re: Objective-C and it's future (From: Charlton Wilbur <email@hidden>)

  • Prev by Date: Re: Objective-C and it's future
  • Next by Date: Re: Objective-C and it's future
  • Previous by thread: Re: Objective-C and it's future
  • Next by thread: Re: Re: Objective-C and it's future
  • Index(es):
    • Date
    • Thread