I think the biggest benefit is that your async programming becomes/or looks more sequential/synchroneous which tend to be easier to follow, or in other words less spaghetti-ish.
And I definitely beg to differ that.
Take this future-less code from a chat server:
| void rpc_call_muc_join(ReturnCall x, mapping args ) | { | [string muc,string who] = get_args(args, | "muc",stringp, | "inviter",ornull(stringp)); | | Channel channel = get_destination( muc ); | int when = now(); | | channel->when_available() | { | if( !channel->exists() ) | client_error(x, "No such channel" ); | | channel->joined( user->id, when ) { | me->join_channel( channel ) { | channel->add_message( msg( "joined", | "user_ids",({format_destination(me)}), | "by",format_destination(me), | "when", now)) { | x(true); // return true. | }; | }; | }; | }; | }
Todays quiz: Is it really harder to read, and how many asynchronous levels do you think there is in it? :)
Also: Could we get rid of the trailing ';' somehow in the grammar?