"Eric M. Ludlam" <eric@...> writes:
> Greetings,
>
> As Nathan noted the other day, C++ operators were suggested as
> completion elements for a method call. This is because semantic
> treats operators as methods of a class.
>
> For those of you who program in C++ more than I, here is a question:
> Should operators be treated as:
>
> a) A function, with tools filtering out functions which are operators.
> b) Add a new operator tag class to the semantic API.
>
> Consider writing some Emacs code that deals with methods or operators
> in some way. Would they be treated the "same" most of the time, and
> sometimes differently, or are they always treated differently.
>
> If an operator tag class is added, does it apply to java or python?
> I'm not that familiar with those languages.
Java doesnt have operator overloading, by design.
Python does have operator overloading, for instance define a __add__
method in a class.
Ocaml, which I'm interested in, have operator definition posibilities,
but not really operator overloading, since ocaml has type inference.
In all languages I'm familiar with operators are functions, with a
different syntax for calling them. Its not really useful to get them
in function completion lists, but maybe in some cases, like when
jumping to a definition of a function.
So, I would tend to think of operators as functions with special
properties, that I might want to filter out at times.
Maybe there are other function properties that might be treated the
same way, like maybe elisp functions defined at the C level, or Corba
functions only available through IDL interface files. I'm just
speculating here.
> Thanks
> Eric
>
> --
> Eric Ludlam: zappo@..., eric@...
> Home: http://www.ludlam.net Siege: http://www.siege-engine.com
> Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--
Joakim Verona
|