On Sat, Oct 18, 2008 at 4:14 PM, Yu Feng <
rainwoodman gmail com> wrote:
> On Sat, 2008-10-18 at 22:57 +0200, Ali Sabil wrote:
>> Hi all,
>>
>> I would like to start a discussion about a small syntactic sugar
>> addition to Vala, that would in my opinion slightly improve the
>> situation with asynchronous code. The following code sample should be
>> self explanatory about my proposal:
>>
>> delegate bool HttpResponseCallback (string response);
>>
>> public class HttpClient : Object {
>> public void post_request (string request, HttpResponseCallback cb)
>> {
>> cb ("Hello world");
>> }
>> }
>>
>> // Current State
>> var client = new HttpClient ();
>> client.post_request("GET ....", (response) => {
>> debug ("got response %s", response);
>> return true;
>> }
>> );
>>