Re: [Vala] vala libgda LINQ
- From: Luca Bruno <lethalman88 gmail com>
- To: vala-list gnome org
- Subject: Re: [Vala] vala libgda LINQ
- Date: Wed, 04 Dec 2013 09:40:44 +0100
LINQ is just some kind of syntax for some functional programming
aspects. It's about to be a 1:1 mapping with filter-map, also fold and
scan..
For example:
select field1,field2 from collection where field3==value
can be written as:
collection.filter((r) => r.field3==value).map((r) => {r.field1, r.field2});
Obviously, LINQ is not only that, but that's a good approximation.
That said, implement filter, map and fold in your collections library
and you can avoid the LINQ syntax :-)
Consider libgee has filter, map, fold and scan with which you can
implement a large subset of LINQ, including aggregate operators.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]