• 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: Side-affect free methods?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Side-affect free methods? (From: Stefan Pantos <email@hidden>)

  • Prev by Date: Re: Tuning KVO validation.
  • Next by Date: Re: Tuning KVO validation.
  • Previous by thread: Side-affect free methods?
  • Next by thread: Re: cocoa-dev digest, Vol 2 #3738 - 11 msgs
  • Index(es):
    • Date
    • Thread