[Top][All Lists]

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

Re: progmodes/project.el and search paths

From: Nix
Subject: Re: progmodes/project.el and search paths
Date: Thu, 13 Aug 2015 12:53:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

On 12 Aug 2015, David Engster verbalised:

> Stephen Leake writes:
>> - Search for all implementations of this method.
>>     That's the language used by elisp cl-generic and eieio defclass. I
>>     just made this the default behavior for xref-find-definitions.
>>     Although that's not tested on eieio classes; I'll add that to my
>>     list.
>>     In Ada, it's called "functions that override primitive operations".
>>     In C++, it's "functions that override a virtual function".
>>     The terminology is different, but the underlying notion of runtime
>>     dispatch is the same.
>>     We might want to customize the menu entry depending on the current
>>     programming language.
> As always, it is more complicated in C++ (overload vs override,
> namespaces, argument dependent lookup, etc.), but currently I don't
> worry too much about details. Getting the usual dispatch right would
> cover a lot of ground.

Quite. Given that name lookup can be literally arbitrarily complicated
in C++, the only way to get it guaranteed right there involves writing a
C++ compiler in elisp or compiler assistance -- and even that is kind of
hopeless, because of course CEDET has to routinely work with
uncompilable and only-partially-written buffers. (This is a fairly
strong argument *against* relying on the compiler, in fact -- we'll
always want something like Semantic, because we can tell it to be less
pedantic in its parsing, recover as much as possible from every parse
error, and so on.)

>> In C, these searches are simpler; the first three only return one
>> result.
> Aah, the joys of ANSI C. Our parser is actually pretty good for
> that. :-)

Now, of course, we have C11's _Generic to make things more interesting

NULL && (void)

reply via email to

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