Re: Side-affect free methods?
Re: Side-affect free methods?
- Subject: Re: Side-affect free methods?
- From: Allan Odgaard <email@hidden>
- Date: Wed, 25 Feb 2004 13:27:56 +0100
On 25. Feb 2004, at 13:06, Stefan Pantos wrote:
Is there anyway to define a methods as being side-affect free? So
it doesn't effect the object it is executed on. Like making a method
in c++ const.
The pattern for this is to create an immutable class with a mutable
subclass. So everything in the super class is 'const'.
But there is no compile-time checking, and, for a lot of tasks, this
pattern is probably not very applicable.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.