On Wed, 25 May 2016 12:01:59 +0100 Daniel Kolesa <dan...@octaforge.org>
wrote:

> Hello,
> 
> I've started removal of support for pointers in Eolian in order to
> bring the language one level up and make it easier to do bindings.
> This has already been done for class handles and for complex types
> like array, hash, iterator etc. but currently one big obstacle in the
> way is strings. I have a pretty clear idea in my head but it's
> possible I might have missed something so I'm asking here if anyone
> has any feedback or ideas or whatever that I could have missed before
> implementing it.
> 
> Basically my idea currently is to introduce a new "string" builtin,
> which ALWAYS represents const char *. Mutable char pointers will not
> be possible with this system - I believe we don't want these either,
> because they're low level and represent something that you can change
> but not resize, plus it doesn't map well to various languages,
> especially scripting ones. I did some analysis on our API and it seems
> we actually have very few uses for mutable char pointers - there is
> currently only a handful of cases across the EFL, as opposed to
> countless const ones. APIs that currently use mutable char pointers
> would be dealt with on per-case basis and redesigned, probably to use
> something like Eina_Strbuf (in most cases; strbuf will get another
> builtin eolian type) with wrappers for legacy.
> 
> Another thing is stringshares - I'm considering introducing another
> builtin for that, but maybe that won't be necessary. I gotta
> investigate more - again, there's only a handful of cases across the
> EFL anyways.
> 
> Overall, removing pointers will benefit probably everyone, I believe.
> For one it will mean that there won't be any need to map pointer types
> to higher level languages in generators; another thing is that it
> means death of nested types in Eolian, which will make manipulation of
> types with the API much simpler.
> 
> If you have any objections or notes, please bring them up. Otherwise,
> I will proceed with my approach.

Just woke up, but my initial thought is ... Lua has their user data
types, which are basically thin wrappers around C pointers or C data
structures.  Edje_lua2 uses them.  Dunno about the new EFL Lua stuff,
still have not gotten around to experimenting with that yet, but that
heavily uses LuaJIT FFI, which deals more directly with things like C
pointers.  So doesn't sound like such a good idea to me.

-- 
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to