Skip navigation.
 
mlRe: Objective-C and it's future
FROM : Charlton Wilbur
DATE : Sat Jul 08 01:55:52 2006

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_removed>

Related mailsAuthorDate
mlObjective-C and it's future Thomas Davie Jul 8, 01:33
mlRe: Objective-C and it's future Finlay Dobbie Jul 8, 01:46
mlRe: Objective-C and it's future Shawn Erickson Jul 8, 01:48
mlRe: Objective-C and it's future Charlton Wilbur Jul 8, 01:55
mlRe: Objective-C and it's future Thomas Davie Jul 8, 02:10
mlRe: Objective-C and it's future Robert Walker Jul 8, 02:12
mlRe: Re: Objective-C and it's future Shawn Erickson Jul 8, 02:22
mlRe: Objective-C and it's future Rob Ross Jul 8, 02:29
mlRe: Re: Objective-C and it's future Shawn Erickson Jul 8, 02:41
mlRe: Objective-C and it's future Thomas Davie Jul 8, 02:42
mlRe: Objective-C and it's future Erik Buck Jul 8, 02:50
mlRe: Objective-C and it's future Kenny Leung Jul 8, 02:57
mlRe: Objective-C and it's future Gregory Weston Jul 8, 03:00
mlRe: Objective-C and it's future Damien Sorresso Jul 8, 03:00
mlRe: Objective-C and it's future Damien Sorresso Jul 8, 03:00
mlRe: Re: Objective-C and it's future Shawn Erickson Jul 8, 03:07
mlRe: Objective-C and it's future Thomas Davie Jul 8, 03:12
mlRe: Objective-C and it's future Damien Sorresso Jul 8, 03:14
mlRe: Objective-C and it's future Rob Ross Jul 8, 03:15
mlRe: Objective-C and it's future Rob Ross Jul 8, 03:18
mlRe: Re: Objective-C and it's future Shawn Erickson Jul 8, 03:23
mlRe: Re: Objective-C and it's future Shawn Erickson Jul 8, 03:25
mlRe: Objective-C and it's future Thomas Davie Jul 8, 03:28
mlRe: Objective-C and it's future Thomas Davie Jul 8, 03:40
mlRe: Objective-C and it's future Sherm Pendley Jul 8, 03:54
mlRe: Objective-C and it's future Kenny Leung Jul 8, 03:56
mlRe: Objective-C and it's future Shawn Erickson Jul 8, 04:22
ml[Moderator] Re: Objective-C and it's future cocoa-dev-admins Jul 8, 04:56
mlRe: Objective-C and it's future Thomas Davie Jul 8, 13:10
mlRe: Objective-C and it's future listposter Jul 8, 17:02
mlRe: Objective-C and it's future cocoa-dev-admins Jul 8, 17:05
mlRe: Objective-C and it's future John C. Randolph Jul 8, 18:50
mlRe: Objective-C and it's future Ryan Stevens Jul 8, 19:13
mlRe: Objective-C and it's future Scott Thompson Jul 10, 16:21
mlRe: Objective-C and it's future Andrew Satori Jul 10, 16:43
ml[Modertator] Re: Objective-C and it's future cocoa-dev-admins Jul 10, 17:13