On Wed, Aug 24, 2016 at 12:17:36PM +0900, Carsten Haitzler wrote: > On Tue, 23 Aug 2016 14:22:42 +0100 Tom Hacohen <t...@osg.samsung.com> said: > > > On 23/08/16 14:17, marcel-hollerb...@t-online.de wrote: > > > Hello, > > > > > > i am not so happy with the name efl_self. > > > > > > Reason for that is that "self" is in the context of other languages > > > completly different compared to our use in efl_add. > > > People got confused by it, and used it wrong (We just had the case on > > > irc). > > > And even if they get a error and see pretty quick that this will not > > > work, they still think of the usage of self from other languages. > > > > > > So I would like to propose a name like efl_add_object, efl_add_obj, > > > efl_added which really tells this only makes sense with efl_add, > > > and does not use a keyword which is used different in other languages. > > > > > > Objections / Input ? > > > > > > > I don't really care one way or the other, but just going to say what I > > said before on IRC so both side of the argument are represented: > > > > Our usage of "self" is not completely different to other languages. We > > use it to mean "self" just like every other language, but our scope > > where it's allowed is smaller, only in eo_add(). > > > > People will get confused once, and then when they see it doesn't work > > will hopefully read the docs/ask if not just understand on their own. > > Amount of time spent per person: 1 minute in a lifetime (unlikely anyone > > will repeat this twice). Literally not worth adding an extra letter to > > type/read for. > > i agree - it is "self" within that context. within an eo_add() only. it's not > used anywhere else (or to be used). efl_self is simple and fairly obvious as > what it implies - you just need to learn the "it is only used in this > context". > if we rename it will it change this at all? i doubt it. it'll be harder to > DISCOVER but people may still be as confused as to why we renamed it something > else than "self" or "this".
As i said in the other mail, its NOT simple and fairly obvious, eo_add does NOT open a new scope where it is obvious that now the just added object is self. It still looks like you are in the scope of your calling function. And so self there is missleading. And of course someone who wants to use the api should learn the api. But why making it harder by naming things in a way that the api can be confusing? Also its not harder to discover a other name its still in the same place, the reason why it should be not be self or this is more that its different and can be missunderstood. > > > As I said though, I don't really care either way, though I think > > efl_self is much better than efl_add_obj/object. > > > > -- > > Tom. > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > enlightenment-devel mailing list > > enlightenment-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > > > > -- > ------------- Codito, ergo sum - "I code, therefore I am" -------------- > The Rasterman (Carsten Haitzler) ras...@rasterman.com > > > ------------------------------------------------------------------------------ > _______________________________________________ > 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