gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnustep-cvs] r32880 - /libs/back/trunk/Source/cairo/CairoFontEnumer


From: Fred Kiefer
Subject: Re: [Gnustep-cvs] r32880 - /libs/back/trunk/Source/cairo/CairoFontEnumerator.m
Date: Mon, 18 Apr 2011 21:09:28 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Thunderbird/3.1.8

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]