GNU bug report logs - #10781
EIEIO namespace use

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Fri, 10 Feb 2012 18:42:01 UTC

Severity: important

Found in version 24.0.92

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Forwarded to http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00199.html

Full log


Message #26 received at 10781 <at> debbugs.gnu.org (full text, mbox):

From: "Eric M. Ludlam" <ericludlam <at> gmail.com>
To: David Engster <deng <at> randomsample.de>
Cc: 10781 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Subject: Re: bug#10781: EIEIO namespace use
Date: Sat, 28 Apr 2012 18:29:44 -0400
On 04/28/2012 05:03 PM, David Engster wrote:
> Stefan Monnier writes:
>>> Yes, I think 'this' should indeed become 'eieio-this'. It will also be
>>> the most work, since at least in CEDET you *very* often have
>>
>>> (defmethod foo ((this someclass) ...)
>>>   ...)
>>
>>> so a 'this' in such a method is perfectly fine.
>>
>> An alternative approach is to keep the name `this' but get rid of the
>> global definition.  I.e. Either completely remove the (defvar this nil),
>> or replace it with (defvar this).
>
> Eric, what would you prefer? I don't know enough about CLOS to say how
> important a global 'eieio-this' actually is. Either way, I just tested
> both solutions on CEDET trunk and each produced exactly this single
> compile warning:
>
> In ede-flush-directory-hash:
> files.el:230:38:Warning: reference to free variable `this'
>
> So actually, this appears to be a much smaller issue than I initially
> thought. It seems pretty much every 'this' in CEDET is already bound in
> the defmethod's argument list.

I would be happy to see 'this' just completely removed.  It was put in 
when I was mimicing C++, and some old programs of mine that have long 
since rotted away depended on it.  I'm actually surprised there was a 
reference to it in CEDET still.  That will be good to clean up.

Eric




This bug report was last modified 9 years and 41 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.