Message cascading
Message cascading
- Subject: Message cascading
- From: "Frode" <email@hidden>
- Date: Tue, 13 Dec 2005 15:05:04 +0100
- Importance: Normal
Check out this posting
Subject: Smalltalk-like cascaded message extension for Objective-C
Newsgroup: gnu.gcc.bug
From: Lee Kyunghoon
Date: 11 Feb 1995
An extension is proposed, ignoring whether itself is returned or not,
similar to the well accepted C++ standard templates function
concatenation.
The syntax is
BOOL wasReduced = [obj setNominator:7; setDenominator:21;
reduceFraction];
corresponding to
BOOL wasReduced;
[obj setNominator:7];
[obj setDenominator:21];
wasReduced = [obj reduceFraction];
It looks like warnings are induced if any intermediare messages returns
something.
Unfortunately, it looks like it never was accepted. I can't see it do
harm with current objc syntax, or does it?
Regards,
Frode
-----Original Message-----
From: glenn andreas
Sent: Tuesday, December 13, 2005 12:44 AM
To: Frode
Cc: email@hidden
Subject: Re: NSObject Exercise comments?
On Dec 12, 2005, at 5:13 PM, Frode wrote:
>
>
>
-----Original Message-----
>
From: glenn andreas
>
Sent: Monday, December 12, 2005 8:54 PM
>
To: John Stiles
>
Cc: email@hidden; Andreas Mayer
>
Subject: Re: NSObject Exercise comments?
>
>
> Method chaining gets real confusing real quick because there's no
>
> clear difference between something that is using it to perform a
>
>
>
I rather use the special methods that returns a copy just for
>
chaining.
>
:) It's like objective-c is designed for chaining, compared to c++.
>
Even
>
messages to 0 is accepted for pointer returns, thus you'll never
>
need to
>
check pointer validity.
Please read the (painfully long) thread about this that occurred on
comp.lang.objective-c a while back:
<
http://groups.google.com/group/comp.lang.objective-c/browse_frm/
thread/f820c36e3a3f8050?q=chaining+group:comp.lang.objective-c&hl=en&>
_______________________________________________
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