Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LINQ query syntax documentation #63

Open
gravityctrl opened this issue Feb 12, 2020 · 2 comments
Open

LINQ query syntax documentation #63

gravityctrl opened this issue Feb 12, 2020 · 2 comments

Comments

@gravityctrl
Copy link

Even though it is stated that LINQ query syntax should be avoided due to performance reduction - Is there a chance, that the documentation could be enhanced by laying out the examples in both syntax styles?

As a learner who tries to get get his head around parsing things, I find myself to be much more comfortable using the LINQ query syntax, as it is much easier to read and understand. That is why I make good progress with understanding Sprache, that has inspired this project.

An alternative Json tutorial would also be an option, if the contributors feel, that the README is blown up enough.

Thank you!

@benjamin-hodgson
Copy link
Owner

I’m always very happy to get documentation pull requests!

@miloszkukla
Copy link

miloszkukla commented Jun 15, 2020

For future travellers I've just discovered method for understanding/translating LINQ query syntax into method syntax - in dnSpy uncheck the "Decompile query expressions" option and there you go you. Oh and we can actually press F12 on LINQ query keyword like from, where, select - it navigates to Pidgin methods implementing them - SelectMany, Where, Select and this methods call Bind, Assert and Map methods respectively.

Example with dnSpy for TagBody from Xml example:

Original:
image

Decompiled:
image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants