Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What Should I learn Before Cocoa?



On Thursday, September 4, 2003, at 01:37 PM, Thomas McQuitty wrote:
However, I still look at some of the code in Objective-C and compare it to C++ and wonder why the function calls in Objective C are so dang long. I don't know of another language where you specify the function's variable along with the passing variable.. :)

Some responses:

(a) They aren't function calls, they're message sends. The method invocation that they result in is looked up dynamically at run time.

(b) Functions aren't passed variables, they're passed parameters. Same with message sends. Passing the parameter names is very useful, it really does lead to much more self-documenting code than most other languages.

(c) The keyword-argument message send syntax comes from Smalltalk. Common Lisp also supports optional keyword arguments.

-- Chris

--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Mac OS X Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
projectbuilder-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/projectbuilder-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: What Should I learn Before Cocoa? (From: Thomas McQuitty <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.