Is it possible to handle 'magic' property assignments a'la PHP?
Jacob Carlborg
doob at me.com
Mon Jan 6 23:50:13 PST 2014
On 2014-01-06 22:07, Philippe Sigaud wrote:
> Ruby does have a clean syntax (though I find blocks to be a bit heavy).
I like the block syntax. It allows one to create what looks like new
statements:
loop do
# endless loop
end
I would like to have that in D as well, but with braces instead:
void loop (void delegate () dg);
loop {
// endless loop
}
In Ruby 1.9 they introduced a slight more lightweight syntax for lambdas:
callback = -> { p "foo" }
bar(callback)
> But I'm not overloading any syntax here. I'm using a closure, not an
> expression template.
>
> Table.where!(e => e.first_name != "foo" && e.first_name.length > 4).first;
How is that being transformed in to SQL then?
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list