kellyethridge / VBCorLib

The VBCorLib framework brings many of the powerful .NET classes to VB6.
http://www.kellyethridge.com/vbcorlib/
MIT License
112 stars 28 forks source link

Consider adding LINQ-like Lambdas #96

Open sancarn opened 3 years ago

sancarn commented 3 years ago

Just a heads up, we've made a Lambda class which could be useful in VBCorLib also, it should be compatible.

It would allow code similar to:

set newNumbers = numbers.Where(linq("$1 mod 2 == 0").OrderBy(linq("$1"));

It should be usable in VB6 as it is. Bear in mind our current parser doesn't manage parameter names, but with a little modification we should be able to change that to something more like linq: (p1,p2) => p1*p2.

kellyethridge commented 3 years ago

That's certainly an interesting idea. I'll have to check this out.