Hey k-s,

On 20 December 2016 at 20:03, Gustavo Sverzut Barbieri <barbi...@gmail.com>
wrote:

> On Mon, Dec 19, 2016 at 11:05 PM, Jean-Philippe André <j...@videolan.org>
> wrote:
> > On 19 December 2016 at 21:10, Gustavo Sverzut Barbieri <
> barbi...@gmail.com>
> > While these are nice to be "class methods" since one could get these
> >> to work with subclasses, they are often used with the original class.
> >> Then my request is to either to introduce a "staticmethod" OR to use
> >> some macro trick to count the number of parameters and pass the class
> >> automatically when omitted or generate 2 functions, one with class and
> >> another without (one could be an actual function, while the other just
> >> a macro).
> >>
> >> End goal is to make these look more like:
> >>
> >>     efl_net_ip_address_create(1234, "127.0.0.1");
> >
> >
> > A macro could be nice. We still need @class functions to work with other
> > classes than the one that declares the method. Each class can then have
> its
> > own implementation of the common @class function. Should all sub
> > implementations also provide a macro, then?
>
> that's a neat idea, to generate the macros with the new name if
> "implements"
>
> but if we do a macro that counts the number of parameters and if no
> class is given it would assume the default class (base), that's easier
> to use.
>

I'm a bit worried about the naming scheme for those macros, as they would
then have to merge a full method name (eg. my_first_class_func) and the
implementing class name (eg. my_other_class). I honestly didn't really
think of this idea as very neat because of this ;) But maybe you have a
good idea?

As you may know I've used such a factory for input events, and the syntax
is a bit crappy (but it returns the private data, which is convenient for
internal code).

-- 
Jean-Philippe André
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to