[Top][All Lists]

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

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109327: Generalize INTERNAL_FIEL

From: Paul Eggert
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109327: Generalize INTERNAL_FIELD between buffers, keyboards and frames.
Date: Sun, 05 Aug 2012 07:23:44 -0800
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0

On 08/05/2012 06:59 AM, Dmitry Antipov wrote:
> if you have a huge class with 50 private members, you're
> enforced to have 50 get_xxx and 50 set_xxx member functions.
> Most of them are inline and fast,
They're *all* inline and fast, unless we put
hooks in them that make them slow.

The creation of the getter and setter methods
is mechanical and can be automated if need be,
so that's not really an obstacle.  The important
thing here is the readability of the use of these
constructs; their definition is secondary.

The main issue is readability.  I find it more
readable when the notation "f (x)" in ordinary C code
means that F is a function, instead of some other
construct that cannot possibly be a function.

reply via email to

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