Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LINQ for Fox - Beta testers needed.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01053144
Message ID:
01053474
Views:
10
>Hi Brent,

Brent? Is that what Greg mean in your country? Or is it the UT translating my name wrong?

>as for your sample - you missed core features:
>Enabling Intellisense by freeing the query from its string (de)limiters and making it native to the language. What arguments get passed to the SQL server behind the scenes is black-boxed by DLINQ.
>

First, I was not attempting to simulate the LINQ as it is implemented in .NET. Client-side cursor is already available natively to VFP. What I was creating was a way to use SQL to manipulate other forms of lists (Collections, Array, etc.) For example, with my Query function, I can generate a two dimensional array from literal values in a single statement. Yes, arrays of this nature can be created in Fox using conventional means.

One truly cool thing about this function is I can query a collection, and filter it against another list and output the result to even another list format. Or, perform a Group By on, say, an array, or a delimited string. These are not that easy to do by straight forward commands in VFP.

I a sence, it treats various types of list format as if they are the same kind. To the Query function, they all appear as cursors.

>If you really want to get somewhere near to LINQ, you should at least implement the object syntax with methods like .From, .Select, .Where, .OrderBy, which is an intermediate step in LINQ. Have no idea how difficult or possible it would be to cast this in a real SQL expression.
>
>Guess most of the functionality can / could be retrofitted to VFP, but the question is: What do we gain and is it worth the time and effort.
>
>It´s VERY elegant what Anders Hejlsberg showed at PDC and it´s great they finally take .Net next year (or 2007) further than where VFP´s been for a decade
>
>It´s very elegant to query an array or a collection or just anything, but I can iterate over it very easily too and sort / order it with an old, native function.
>
>Sadly this will actually be the point where we can let VFP slowly retire and leave Ken alone with begging for version X, as adapted CLR languages + .Net will finally be up to and above VFP.
>
>In the Sedna category on UT I asked for making the [] delimiters 'transparent' for Intellisense and syntax checking - as they already are for the pre-processor, finding and replacing #defines, even when in strings - when delimited with []. - Poor VFPer´s LINQ and a possible quick and dirty fix in Sedna.

I totally agree. And, also, it has been annoying that Intellisense can understand the difference between the square brackets being used as a string delimiter and when it is being used in an array

>
>Interesting times
>Cheers
>G

Thanks for you input and opinion.
Greg Reichert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform