3 ms·
Yeah thought so too... in particular the example where you pass a a generator to a db, the generator isn't actually executed, and instead the expression is pars
by posix86 4y ago
Yeah thought so too... in particular the example where you pass a a generator to a db, the generator isn't actually executed, and instead the expression is parsed & transformed to SQL.
This is cool if it works. Good luck when it doesn't due to user error, and more luck if it doesn't due to a bug.
You need to develop a whole strategy to tell the user what went wrong and how, and why, basically from scratch; admitting that you didn't, in fact, execute the generator, and that they have to change it.
because of that.
It's pretty awesome that it's possible. And it would be pretty amazing to write something like that. But... idk if it's a good idea from a developer stand point. I like being able to understand what's happening in a library with a single click.
- sitharus 4y agoAnd C# can do that with static typing via LINQ, which is really nice honestly. It’s a bit different but it would be something like: var result = await (from c in Customer where c.orders.sum(o => o.price) > 1000 select c).ToListAsync();