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);
What about methods that take 2 callbacks?
-- Christian
2008/10/18 Ali Sabil <[EMAIL PROTECTED]>:
> 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
Since it is just syntactic sugar, you are free to pass 2 callbacks as
parameters or put 2 "pseudo-lambda" expressions after the method call.
--
Ali
On Sat, Oct 18, 2008 at 11:09 PM, Christian Hergert <
[EMAIL PROTECTED]> wrote:
> What about methods that take 2 callbacks?
>
> -- Christian
>
> 200
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 p
I like it. Might get confusing if someone wanted to mix direct
delegates and anonymous ones though.
-- Christian
On Sat, Oct 18, 2008 at 4:14 PM, Yu Feng <[EMAIL PROTECTED]> wrote:
> On Sat, 2008-10-18 at 22:57 +0200, Ali Sabil wrote:
>> Hi all,
>>
>> I would like to start a discussion about a sm
Here is another set of proposed syntaxes, so that the post_request() looks
like this:
client.post_request("GET ") {
debug ("Got Response: %s", response);
} {
debug ("Got error: %s", error);
}
Another possible syntax would be:
client.post_request("GET ...") {
(response) => {
.
Sam
-Original Message-
From: Ali Sabil <[EMAIL PROTECTED]>
Sent: 19 October 2008 11:31
To: Christian Hergert <[EMAIL PROTECTED]>
Cc: Vala Mailing list
Subject: Re: [Vala] Proposal for an improved delegate/lambda handling
Here is another set of proposed syntaxes, so that the
ain.
local_unref(local);
return;
}
Yu
>
> Sam
>
>
>
> __
> From: Ali Sabil <[EMAIL PROTECTED]>
> Sent: 19 October 2008 11:31
> To: Christian Hergert <[EMAIL PROTECTED]>
> Cc: Vala Mailing list
> Subjec
That's pretty much where I'd got up to.
I was also trying to use libffi for it's trampoline for data-less callbacks
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list
abil <[EMAIL PROTECTED]>; Christian Hergert
<[EMAIL PROTECTED]>; Vala Mailing list
Subject: Re: [Vala] Proposal for an improved delegate/lambda handling
On Sun, 2008-10-19 at 14:19 +0100, Sam Liddicott wrote:
I like any method that allows the callback block to acess all
variables
over continuation style code, but might
> not favour signal handler style events, but perhaps they are actually a
> different case anyway...
>
> Sam
>
>
> -Original Message-
> From: Yu Feng <[EMAIL PROTECTED]>
> Sent: 19 October 2008 15:40
> To: Sam
gnal handler style events, but perhaps they are actually a
different case anyway...
Sam
-Original Message-
From: Yu Feng <[EMAIL PROTECTED]>
Sent: 19 October 2008 15:40
To: Sam Liddicott <[EMAIL PROTECTED]>
Cc: Ali Sabil <[EMAIL PROTECTED]>; Christian Hergert
<
* Sam Liddicott wrote, On 20/10/08 07:24:
> Yu Feng wrote:
>> BTW, there is an erudite description on closures (about javascript) at
>> MDC:
>> http://developer.mozilla.org/en/A_re-introduction_to_JavaScript#Closures
>>
>>
> I'm slightly puzzled that I gave the impression that I was confused on
13 matches
Mail list logo