Sam Wilson píše v St 03. 02. 2010 v 10:01 -0500: > > > Q2. > > > Any hope of getting the following replaced > > > with a better syntax? :-) > > > > > > Idle.add(async_function.callback); > > > yield; > > > > > > Why not simply: > > > > > > yield; > > > > > > ? > > > > > > > Because 'yield' just stops the method until the callback resumes it. It > > does nothing else. You can for example wait for a signal this way. > > Resuming in an idle callback is just one of the possibilities. > > Why not > > yield Idle; > > or even > > yield until Idle; >
We should try to limit the amount of GLib specific syntactic sugar. Not add new and totally illogical constructs, just because we are lazy to type a single extra line, which is nowhere near being a single possibility here. I don't think it's even the most useful one.
signature.asc
Description: Toto je digitálně podepsaná část zprávy
_______________________________________________ Vala-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/vala-list
