Re: [E-devel] Eolian property setters with return values

2019-10-21 Thread Mike Blumenkrantz
Hi,

I think either proposal is reasonable.

In the case where "bool return on property set indicates success", this can
be enforced in eolian since it's a combination of property+typereturn, and
it can be documented (and expanded on automatically in doc generation) to
be more descriptive for anyone reading the documentation. It seems to me
that, from an intuitive perspective, this would already make sense to
anyone at a glance anyway.

As for having an error_return flag/type, this also seems fine from a
functional and documentation perspective, though it feels a bit strange and
not-intuitive to have a different keyword/return type specific to property
set methods than is used for methods which return bool.


Regards,
Mike

On Mon, Oct 21, 2019 at 12:01 PM Tom Hacohen  wrote:

>
>
> On 21/10/2019 18:54, Xavi Artigas wrote:
> >>
> >> Maybe in general we need a way to mark a return/parameter as an error
> >> indicator? It's just a half-baked thought, though maybe worth exploring.
> >>
> >
> > There's already a couple of ideas on Phab in this direction: Add custom
> > tags to Eolian ( https://phab.enlightenment.org/T8294 ) or use
> Eina.Error
> > instead of bool when the setter intends to actually return an error.
> > To avoid breaking API in the second case, we could use a "lightweight
> eina
> > error" which is actually a boolean (as Marcel suggests).
> > I just thought that if we could agree that setters returning bools always
> > mean "error", we could avoid the extra complexity.
>
> Sure, though just a convention is not enough. You need to have them
> properly marked so it can be enforced by Eolian and that people who are
> writing (and reading!) these interfaces know this what it means.
>
> --
> Tom
>
> >
> > Xavi
> >
> >
> >>
> >> --
> >> Tom
> >>
> >> On 21/10/2019 17:49, Xavi Artigas wrote:
> >>> Hi people,
> >>>
> >>> We are encountering a problem when matching EO properties to C#
> >> properties,
> >>> since the C# ones cannot have a return value.
> >>>
> >>> We mostly use return values in EO property setters to indicate error
> >>> conditions and this is pretty easily matched to C# by throwing an
> >>> exception. We just need to know WHEN a returned bool from a setter
> really
> >>> means ERROR and when it is not.
> >>> Currently, all property setters in our tree returning a bool use it to
> >>> indicate an error, so it is just a matter of we all agreeing that in
> the
> >>> future this will always be the case (and documenting it).
> >>> If we agree on this, then the C# bindings can start throwing exceptions
> >> on
> >>> setters returning FALSE (there's a patch ready, but I cannot access it
> >>> right now).
> >>>
> >>> If nobody has anything against it, I'll land this patch in a week
> >> (October
> >>> 28th).
> >>>
> >>> Thanks!
> >>> Xavi
> >>>
> >>> ___
> >>> enlightenment-devel mailing list
> >>> enlightenment-devel@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >>>
> >>
> >>
> >> ___
> >> enlightenment-devel mailing list
> >> enlightenment-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >>
> >
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
>
>
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>

___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Eolian property setters with return values

2019-10-21 Thread Tom Hacohen



On 21/10/2019 18:54, Xavi Artigas wrote:
>>
>> Maybe in general we need a way to mark a return/parameter as an error
>> indicator? It's just a half-baked thought, though maybe worth exploring.
>>
> 
> There's already a couple of ideas on Phab in this direction: Add custom
> tags to Eolian ( https://phab.enlightenment.org/T8294 ) or use Eina.Error
> instead of bool when the setter intends to actually return an error.
> To avoid breaking API in the second case, we could use a "lightweight eina
> error" which is actually a boolean (as Marcel suggests).
> I just thought that if we could agree that setters returning bools always
> mean "error", we could avoid the extra complexity.

Sure, though just a convention is not enough. You need to have them
properly marked so it can be enforced by Eolian and that people who are
writing (and reading!) these interfaces know this what it means.

--
Tom

> 
> Xavi
> 
> 
>>
>> --
>> Tom
>>
>> On 21/10/2019 17:49, Xavi Artigas wrote:
>>> Hi people,
>>>
>>> We are encountering a problem when matching EO properties to C#
>> properties,
>>> since the C# ones cannot have a return value.
>>>
>>> We mostly use return values in EO property setters to indicate error
>>> conditions and this is pretty easily matched to C# by throwing an
>>> exception. We just need to know WHEN a returned bool from a setter really
>>> means ERROR and when it is not.
>>> Currently, all property setters in our tree returning a bool use it to
>>> indicate an error, so it is just a matter of we all agreeing that in the
>>> future this will always be the case (and documenting it).
>>> If we agree on this, then the C# bindings can start throwing exceptions
>> on
>>> setters returning FALSE (there's a patch ready, but I cannot access it
>>> right now).
>>>
>>> If nobody has anything against it, I'll land this patch in a week
>> (October
>>> 28th).
>>>
>>> Thanks!
>>> Xavi
>>>
>>> ___
>>> enlightenment-devel mailing list
>>> enlightenment-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>>
>>
>>
>> ___
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
> 
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Eolian property setters with return values

2019-10-21 Thread Tom Hacohen



On 21/10/2019 18:51, Marcel Hollerbach wrote:
> On 10/21/19 5:37 PM, Tom Hacohen wrote:
>> I agree it's most of them, though it's not all of them. IIRC there are
>> some that indicate "nothing happened", at least in textblock. It
>> shouldn't be too hard to fix these though.
>>
>> Maybe in general we need a way to mark a return/parameter as an error
>> indicator? It's just a half-baked thought, though maybe worth exploring.
> 
> Maybe some internal "error_flag" type from eolian, which can be
> translated to a Exception in the languages supporting them, or to a
> simple Eina_Bool in case of C ?

Yeah, that's what I had in mind. Not necessarily Eina_Bool, it could be
an int too, or probably whatever?


error_return bool;
or
return bool @error;

Not sure to be honest, needs thinking, but just generally what I had in
mind.



> It can only be returned (so exceptions do work). This would also not
> mean a API/ABI break to C.
Yup, defo.

> 
>>
>> -- 
>> Tom
>>
>> On 21/10/2019 17:49, Xavi Artigas wrote:
>>> Hi people,
>>>
>>> We are encountering a problem when matching EO properties to C#
>>> properties,
>>> since the C# ones cannot have a return value.
>>>
>>> We mostly use return values in EO property setters to indicate error
>>> conditions and this is pretty easily matched to C# by throwing an
>>> exception. We just need to know WHEN a returned bool from a setter
>>> really
>>> means ERROR and when it is not.
>>> Currently, all property setters in our tree returning a bool use it to
>>> indicate an error, so it is just a matter of we all agreeing that in the
>>> future this will always be the case (and documenting it).
>>> If we agree on this, then the C# bindings can start throwing
>>> exceptions on
>>> setters returning FALSE (there's a patch ready, but I cannot access it
>>> right now).
>>>
>>> If nobody has anything against it, I'll land this patch in a week
>>> (October
>>> 28th).
>>>
>>> Thanks!
>>> Xavi
>>>
>>> ___
>>> enlightenment-devel mailing list
>>> enlightenment-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>>
>>
>>
>> ___
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
> 
> 
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Eolian property setters with return values

2019-10-21 Thread Xavi Artigas
>
> Maybe in general we need a way to mark a return/parameter as an error
> indicator? It's just a half-baked thought, though maybe worth exploring.
>

There's already a couple of ideas on Phab in this direction: Add custom
tags to Eolian ( https://phab.enlightenment.org/T8294 ) or use Eina.Error
instead of bool when the setter intends to actually return an error.
To avoid breaking API in the second case, we could use a "lightweight eina
error" which is actually a boolean (as Marcel suggests).
I just thought that if we could agree that setters returning bools always
mean "error", we could avoid the extra complexity.

Xavi


>
> --
> Tom
>
> On 21/10/2019 17:49, Xavi Artigas wrote:
> > Hi people,
> >
> > We are encountering a problem when matching EO properties to C#
> properties,
> > since the C# ones cannot have a return value.
> >
> > We mostly use return values in EO property setters to indicate error
> > conditions and this is pretty easily matched to C# by throwing an
> > exception. We just need to know WHEN a returned bool from a setter really
> > means ERROR and when it is not.
> > Currently, all property setters in our tree returning a bool use it to
> > indicate an error, so it is just a matter of we all agreeing that in the
> > future this will always be the case (and documenting it).
> > If we agree on this, then the C# bindings can start throwing exceptions
> on
> > setters returning FALSE (there's a patch ready, but I cannot access it
> > right now).
> >
> > If nobody has anything against it, I'll land this patch in a week
> (October
> > 28th).
> >
> > Thanks!
> > Xavi
> >
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
>
>
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>

___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Eolian property setters with return values

2019-10-21 Thread Marcel Hollerbach

On 10/21/19 5:37 PM, Tom Hacohen wrote:

I agree it's most of them, though it's not all of them. IIRC there are
some that indicate "nothing happened", at least in textblock. It
shouldn't be too hard to fix these though.

Maybe in general we need a way to mark a return/parameter as an error
indicator? It's just a half-baked thought, though maybe worth exploring.


Maybe some internal "error_flag" type from eolian, which can be 
translated to a Exception in the languages supporting them, or to a 
simple Eina_Bool in case of C ?
It can only be returned (so exceptions do work). This would also not 
mean a API/ABI break to C.




--
Tom

On 21/10/2019 17:49, Xavi Artigas wrote:

Hi people,

We are encountering a problem when matching EO properties to C# properties,
since the C# ones cannot have a return value.

We mostly use return values in EO property setters to indicate error
conditions and this is pretty easily matched to C# by throwing an
exception. We just need to know WHEN a returned bool from a setter really
means ERROR and when it is not.
Currently, all property setters in our tree returning a bool use it to
indicate an error, so it is just a matter of we all agreeing that in the
future this will always be the case (and documenting it).
If we agree on this, then the C# bindings can start throwing exceptions on
setters returning FALSE (there's a patch ready, but I cannot access it
right now).

If nobody has anything against it, I'll land this patch in a week (October
28th).

Thanks!
Xavi

___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel




___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel




___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Eolian property setters with return values

2019-10-21 Thread Tom Hacohen
I agree it's most of them, though it's not all of them. IIRC there are
some that indicate "nothing happened", at least in textblock. It
shouldn't be too hard to fix these though.

Maybe in general we need a way to mark a return/parameter as an error
indicator? It's just a half-baked thought, though maybe worth exploring.

--
Tom

On 21/10/2019 17:49, Xavi Artigas wrote:
> Hi people,
> 
> We are encountering a problem when matching EO properties to C# properties,
> since the C# ones cannot have a return value.
> 
> We mostly use return values in EO property setters to indicate error
> conditions and this is pretty easily matched to C# by throwing an
> exception. We just need to know WHEN a returned bool from a setter really
> means ERROR and when it is not.
> Currently, all property setters in our tree returning a bool use it to
> indicate an error, so it is just a matter of we all agreeing that in the
> future this will always be the case (and documenting it).
> If we agree on this, then the C# bindings can start throwing exceptions on
> setters returning FALSE (there's a patch ready, but I cannot access it
> right now).
> 
> If nobody has anything against it, I'll land this patch in a week (October
> 28th).
> 
> Thanks!
> Xavi
> 
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Enlightenment Developer Days call for proposals

2019-10-21 Thread Stefan Schmidt

Hello.

As we are approaching roughly one month before EDD we should think about 
discussion  and talk proposals for EDD.

As I mentioned before I would like to have more discussions instead of
lecture style talks.

Bring a topic and prepare some slides to define the topic and questions
that you want to discuss.
The slides should be used to kickstart the discussions only. The
discussion can later be followed up on the mailing list with notes from 
the EDD.


If you want to update the attendees on a topic in a more lecture style
talk that is possible as well.

We have no formal program committee this year to decide on the 
proposals. Just mail me your topic and we can discuss it. I don't think 
there will be trouble time wise as we have 2 full days.


Please send in the proposals no later than 31th of October. Title, short
abstract and a time you would expect for it.

As second topic for this mail I wanted to get some feedback on the food
situation. We would have the opportunity to get some catering to bring 
food on site and we have the lunch there. To safe time and make sure we 
actually have a space to eat all together. This would be 15-20 EUR per 
person.

The alternative is to go out, but we likely must reserve somewhere in
advance to actually host > 10 people.

For dinner on Saturday we should to out to a restaurant together. Xavi
is also looking into the options we have there. If you have suggestions 
for this or restrictions we should take into account, please get in touch.


regards
Stefan Schmidt



___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Eolian property setters with return values

2019-10-21 Thread Xavi Artigas
Hi people,

We are encountering a problem when matching EO properties to C# properties,
since the C# ones cannot have a return value.

We mostly use return values in EO property setters to indicate error
conditions and this is pretty easily matched to C# by throwing an
exception. We just need to know WHEN a returned bool from a setter really
means ERROR and when it is not.
Currently, all property setters in our tree returning a bool use it to
indicate an error, so it is just a matter of we all agreeing that in the
future this will always be the case (and documenting it).
If we agree on this, then the C# bindings can start throwing exceptions on
setters returning FALSE (there's a patch ready, but I cannot access it
right now).

If nobody has anything against it, I'll land this patch in a week (October
28th).

Thanks!
Xavi

___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel