Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linq Expression Trees in Compact Framework

The lack of expression trees in Compact Framework has bugged me for some time now, but I haven't really looked for a solution.

Today, I've found a blog post about an alternative System.Linq.Expressions built on top of Mono System.Core and used e.g. by db4o (you can find it here).

My question is - have you used this library and if so, what were your experiences with it (especially regarding performance)?

like image 475
Michał Drozdowicz Avatar asked Jun 10 '10 10:06

Michał Drozdowicz


1 Answers

For LINQ to db4o, System.Linq.Expressions works pretty well. It likely won't be the bottleneck of a Compact Framework application querying a non LINQ to objects source.

If you're just using it for doing some meta-programming, using Compile over and and over, it won't perform as well as on the desktop, as it's basically a reflection based interpreter. For what it's worth, the interpreter passes the full Mono test suite for Expression Trees (it's quite consequent).

The only know bug with it is related to a missing feature of the Compact Framework BCL, making it impossible for csc to emit a proper expression tree when generic fields are involved.

like image 92
Jb Evain Avatar answered Nov 16 '22 03:11

Jb Evain