On Monday, 5 September 2016 at 12:32:49 UTC, Lodovico Giaretta
wrote:
On Monday, 5 September 2016 at 12:15:35 UTC, dom wrote:
[...]
You misunderstood the error message and the lambda syntax (it
also happened to me the first time).
The grammar says that you can use one of these syntaxes:
On Monday, 5 September 2016 at 12:30:37 UTC, Daniel Kozak wrote:
Dne 5.9.2016 v 14:15 dom via Digitalmars-d-learn napsal(a):
...
but what is the difference between a lambda (=>) and a
functions/delegates?
i think this is a major pitfall for newcomers, and should be
adressed somehow.
Yes,
On Monday, 5 September 2016 at 12:15:35 UTC, dom wrote:
[...]
You misunderstood the error message and the lambda syntax (it
also happened to me the first time).
The grammar says that you can use one of these syntaxes:
1) `(arguments) {block of code}`
2) `(arguments) => expression`, which
Dne 5.9.2016 v 14:30 Daniel Kozak napsal(a):
Dne 5.9.2016 v 14:15 dom via Digitalmars-d-learn napsal(a):
...
but what is the difference between a lambda (=>) and a
functions/delegates?
i think this is a major pitfall for newcomers, and should be adressed
somehow.
Yes, RTFM :)
But to be
Dne 5.9.2016 v 14:15 dom via Digitalmars-d-learn napsal(a):
...
but what is the difference between a lambda (=>) and a
functions/delegates?
i think this is a major pitfall for newcomers, and should be adressed
somehow.
Yes, RTFM :)
Dne 5.9.2016 v 14:15 dom via Digitalmars-d-learn napsal(a):
I am about to write my own stupid and simple http client .. and i have
added a callback function that has the received content as a parameter.
class AsyncHttpGet
{
this(string host, ushort port, string path, void delegate(string)
I am about to write my own stupid and simple http client .. and i
have added a callback function that has the received content as a
parameter.
class AsyncHttpGet
{
this(string host, ushort port, string path, void
delegate(string) callback )
{ ... }
}
My first attempt was to write: