emacs-devel
[Top][All Lists]
Advanced

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

Re: Preview: portable dumper


From: Daniel Colascione
Subject: Re: Preview: portable dumper
Date: Tue, 29 Nov 2016 12:36:54 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

On Tue, Nov 29 2016, John Wiegley wrote:
>>>>>> Eli Zaretskii <address@hidden> writes:
>
>>> Could we ask Daniel to include his code under an #ifdef, so until it's 
>>> proven
>>> we can always disable it, or back out the changes easily if need be?
>
>> What would that solve? Don't we still need to review the patches, compile
>> the code once in a while, debug it as needed, etc.?
>
> It keeps the portable dumper fenced off. We'd compile it in by default, but it
> helps future readers, for a while, by clearly demarcating when special
> handling is needed for the sake of that dumper.

FWIW, as a logistical matter, it's not really practical to literally
#ifdef out the pdumper integration into the rest of Emacs. We can,
however, make the pdumper constructs compile down to nothing if you opt
not to enable pdumper in the build configuration. I specifically
designed the pdumper.h API to make this arrangement easy and natural.

As a matter of general taste, I _much_ prefer this style:

    #ifdef HAVE_FOO
        void foo_thing (void);
    #else
    # define foo_thing() ((void)0)
    #endif

        void
        function1()
        {
          ...
          foo_thing();
          ...
        }

        void function2()
        {
          ...
          foo_thing();
          ...
        }

        void function3()
        {
          ...
          foo_thing();
          ...
        }

to this style:

        void
        function1()
        {
          ...
    #ifdef HAVE_FOO
          foo_thing();
    #endif
          ...
        }

        void function2()
        {
          ...
    #ifdef HAVE_FOO
          foo_thing();
    #endif
          ...
        }

        void function3()
        {
          ...
    #ifdef HAVE_FOO
          foo_thing();
    #endif
          ...
        }


>
>>> I'd like to entertain the experiment, if we can.
>
>> Fine, but why do you need me for that? What would be my role in that
>> experiment?
>
> I guess just say OK at this point, and help with the review if you're
> inclined? Daniel will handle the work of integration and documentation.



reply via email to

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