On Jun 22, 2016 9:22 AM, "Daniel Kolesa" <[email protected]> wrote: > > On Mon, Jun 20, 2016 at 1:04 AM, Felipe Magno de Almeida > <[email protected]> wrote: > > > > it is the _perfect_ match IMO. Probably we should ask someone > > that actually uses Lua about it, instead of guessing. > > > > I'm inclined to agree with raster here. I honestly don't see > coroutines being a good match here - the API is one thing, and there > is one other thing to consider that wasn't brought up and that is > performance - coroutines cannot be JITed and for async stuff we'll be > jumping across C-Lua border all the time over classic C API rather > than fast FFI stuff (it will also add a significant amount of new > runtime on C side, which I would rather avoid) which will abort traces > and hurt perf.
Not using coroutines because of performance in lua doesn't seem like a good reason at all IMO. And I don't see where the api doesn't match. That coroutine is not cancellable is not because coroutines are intrinsically not cancellable, it is just because we need cancellation points, which we have with promises. Anyway I don't think this discussion is getting us anywhere IMO. So I'll just leave the discussing in Lua bindings. However the C++ and Javascript bindings should work the same as you propose for Lua. > If we have promises at all (I'm still against them, and I think this > "hurr async everything, promises everywhere" approach creates more > problems than it solves) then the separate promise object is probably > the sanest approach. Obviously this object would be bound manually, > having an eo file defining it is stupid (honestly, I'm against having > Eo.Base in an eo file as well, I'd rather make it a builtin, it's not > like bindings are going to use it - Lua already skips it and binds it > on its own). This is not about async everywhere and not even about using promises for ago async behavior. But I don't see any other proposal for real async operations,which we already have in several places, except in creating horrible API with events for getting results and dealing with private data manually on more events, bending events to the point of almost breaking it so they behave the same even with drastically different behavior. So being against promises is like being against malloc. > D5 > -- Felipe Magno de Almeida ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
