• 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: [OT] "Fluent Interface"? Welcome to NeXT
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] "Fluent Interface"? Welcome to NeXT


  • Subject: Re: [OT] "Fluent Interface"? Welcome to NeXT
  • From: Charlton Wilbur <email@hidden>
  • Date: Fri, 3 Aug 2007 15:44:55 -0400


On Aug 3, 2007, at 3:21 PM, Clark Cox wrote:

On 8/3/07, Charlton Wilbur <email@hidden> wrote:

On Aug 3, 2007, at 1:00 PM, Clark Cox wrote:

I hate to nit-pick, but void wasn't in C until it was standardized in
1989 (by ANSI) and 1990 (by ISO), Objective-C dates back to 1983.
Objective-C obviously predates the void type. In early Objective- C (as
in C) it was impossible to write a function or method that didn't
return a type.

In fact, as near as I can find with a bit of googling, the void type was part of the original spec for C.

The void type was first added to a C compiler in System III C version of PCC, which was in 1988.

Actually, I was wrong about void having been part of the original spec; however, Dennis Ritchie's history of C (http://cm.bell-labs.com/ cm/cs/who/dmr/chist.html, under "Standardization") says:


By 1982 it was clear that C needed formal standardization. The best approximation to a standard, the first edition of K&R, no longer described the language in actual use; in particular, it mentioned neither the void or enum types.

If void was first added to a C compiler in 1988, it seems odd that the lack of mention in K&R would have been a problem in 1982.


Further, a few paragraphs on, he says:

X3J11 introduced only one genuinely important change to the language itself: it incorporated the types of formal arguments in the type signature of a function, using syntax borrowed from C++ [Stroustrup 86].

It seems to me that adding the void type to the language, if it had not existed previously, would have been a fairly important change to the language.


Further, I took a look at _Object-Oriented Programming: An Evolutionary Approach_ to see if I could find an example of void. On page 79, as an example of defining instance methods, I found the following line of code:

- (void) address: (unsigned) anAddress { symbolValue = anAddress };

So if no C compilers before 1988 supported void, what was Dr Cox doing writing about it in 1986? There's also no mention of the void type in the section on C++ earlier in the book.

(Incidentally, that line of code should give the lie to the notion that Objective-C returns self or nil because the concept of void didn't exist.)

But hey, if you want to argue with Dennis Ritchie and Brad Cox, be my guest.

Charlton


-- Charlton Wilbur email@hidden email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >RE: [OT] "Fluent Interface"? Welcome to NeXT (From: Jeff Laing <email@hidden>)
 >Re: [OT] "Fluent Interface"? Welcome to NeXT (From: "Clark Cox" <email@hidden>)
 >Re: [OT] "Fluent Interface"? Welcome to NeXT (From: Brian Willoughby <email@hidden>)
 >Re: [OT] "Fluent Interface"? Welcome to NeXT (From: "Clark Cox" <email@hidden>)
 >Re: [OT] "Fluent Interface"? Welcome to NeXT (From: Charlton Wilbur <email@hidden>)
 >Re: [OT] "Fluent Interface"? Welcome to NeXT (From: "Clark Cox" <email@hidden>)

  • Prev by Date: Re: [OT] "Fluent Interface"? Welcome to NeXT
  • Next by Date: NSURLConnection and multipart/x-mixed streams
  • Previous by thread: Re: [OT] "Fluent Interface"? Welcome to NeXT
  • Next by thread: [moderator again] Re: [OT] "Fluent Interface"? Welcome to NeXT
  • Index(es):
    • Date
    • Thread