Re: ObjC Method naming
Re: ObjC Method naming
- Subject: Re: ObjC Method naming
- From: "David W. Halliday" <email@hidden>
- Date: Mon, 28 May 2001 18:14:12 -0500
- Organization: Latin AmeriCom, formerly Latino Online
email@hidden wrote:
>
If you decide to read some Smalltalk, be careful with the [] syntax. While
>
in Objective-C the [] are used to denote a statement, in Smalltalk they're
>
actually a "block" object. ...
Certainly true (one of the reasons I would like to see Objective-C
replaced, or supplemented, by SmallTalk or TOM [which even goes beyond
SmallTalk when it comes to the ability to modify classes to suit, without
having access to source]).
Another nicety about not using square brackets with SmallTalk (they're
there to avoid conflicts with C's syntax), and the more flexible naming syntax
of SmallTalk, is the ability to have method calls that look just like operator
statements. (For instance, "a = 4 + 5" is like "[a setValue:[4 add: 5]]"---if
integers in Objective-C could be treated directly as objects.)
>
>
... If you decide to try out some
>
Smalltalk, you
>
can download a free implementation at http://www.squeak.org
I'm looking forward to having SmallTalk integrated into gcc. I just hope,
somehow, we will be able to easily interface with Cocoa. (As I recall, there
was a SmallTalk on NEXTSTEP that integrated with the API reasonably well.)
>
>
>
Juan
>
>
-- Original Message --
>
>
>This is also the SmallTalk way of interpreting such a
>
>method call. (Objective-C is kind of a compiled SmallTalk like language
>
>built atop C. It may actually help you to read some on SmallTalk.
David email@hidden