On 20/12/16 11:03, Gustavo Sverzut Barbieri wrote:
> On Mon, Dec 19, 2016 at 11:05 PM, Jean-Philippe André <j...@videolan.org> 
> wrote:
>> Hi,
>>
>> On 19 December 2016 at 21:10, Gustavo Sverzut Barbieri <barbi...@gmail.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> In Efl.Net I've created couple of "constructors" functions to help the
>>> user with common tasks, such as:
>>>
>>
>> Hmm. Sorry to be pedantic, but you've created @class functions, not
>> constructor functions. :)
>>
>>     src/lib/ecore_con/efl_net_ip_address.eo:
>>>
>>>        - create(port, address)
>>>        - create_sockaddr(sockaddr)
>>>        - parse(string)
>>>        - resolve(string, family, flags) (returns a promise)
>>>
>>> In many languages that's easy to use:
>>>
>>>     efl.net.ip_address.create(1234, "127.0.0.1")
>>>
>>> But in C it's a bitch:
>>>
>>>    efl_net_ip_address_create(EFL_NET_IP_ADDRESS_CLASS, 1234, "127.0.0.1");
>>>
>>
>> EO constructors would instead be used as follows:
>> efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, efl_net_ip_address_set(1234,
>> "127.0.0.1"));
>>
>> Not saying it looks any better, really. But that's what constructors are,
>> in EO.
>
> argh... my bad with naming conventions, how should we call what I
> meant? Creators? Factories?
>

Factories most likely.



------------------------------------------------------------------------------
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