On 18.04.2011 14:43, Quentin Mathé wrote:
Le 18 avr. 2011 à 00:29, Eric Wasylishen a écrit :

Author: ericwa
Date: Mon Apr 18 00:29:18 2011
New Revision: 32880

URL: http://svn.gna.org/viewcvs/gnustep?rev=32880&view=rev
Log:
back/cairo: CairoFontEnumerator.m: Replace -handleKey:selector:valueClass: and 
-handleKey:selector: methods with macros.

Modified:
    libs/back/trunk/Source/cairo/CairoFontEnumerator.m

Just curious… What is the motivation behind this change, given that macros are 
harder to reason about and debug than methods? Is this a performance 
improvement?

The reason was me complaining :-)
I don't like code that need to do respondsTo: checks on self. In this specific case this is something that the compiler could do and with macros the compiler should be able to check whether the class implements that methods or not.
Performance shouldn't be much of an issue here.

Next time I will complain to the mailing list, so the blame goes directly to me.

Fred

_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to