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

Added VB (specific/focused) SourceGenerators Sample #691

Closed
wants to merge 0 commits into from
Closed

Added VB (specific/focused) SourceGenerators Sample #691

wants to merge 0 commits into from

Conversation

DualBrain
Copy link
Contributor

This is a VB focused example (similar to the original C#). It's been cleaned up and VB'ised in many areas.

I'm submitting this pull request in part based on the recommendation of @KathleenDollard - if there's anything that needs to be tweaked, adjusted, etc., please let me know.

Thanks for your consideration.

@DualBrain DualBrain requested a review from a team as a code owner December 31, 2020 17:01
@DualBrain
Copy link
Contributor Author

Please note that this isn't the same approach that @sharwell has done (#682); his approach provides value to those that want to handle multiple languages. This pull request is from the point of view of the VB dev wanting to create their own source generators in VB for consumption by VB devs; so I see value in having both examples.

@DualBrain DualBrain changed the title Added VB SourceGenerators Sample Added VB (specific/focused) SourceGenerators Sample Dec 31, 2020
@@ -0,0 +1,23 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❗ This pull request must be rebased to remove the bin/ and obj/ directories from all commits involved in this pull request (we cannot have them in the repository history).

Copy link
Contributor Author

@DualBrain DualBrain Dec 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't realize there wasn't a git.ignore for this project, so for that I apologize for assuming... I can redo/fix (will have to take some time to research/learn how to do this as I've never done it before)... however... given the other comment... doesn't sound like there is interest in accepting the pull.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to add obj/bin folders to the current .gitignore file.

@sharwell
Copy link
Member

sharwell commented Dec 31, 2020

I have some doubts about the incremental value and maintenance burden imposed by these samples over the ones already implemented. At the end of the day, it's exactly the same concept as what is already in the repository, except mechanically ported to Visual Basic. I have doubts about the number of VB users who would be unable to use Source Generators solely due to the lack having access to pre-ported code.

This doesn't mean the samples won't be merged. It's more based on a belief that if the samples are merged, they will eventually be out-of-date and users will have to refer to the C# samples anyway.

@DualBrain
Copy link
Contributor Author

DualBrain commented Dec 31, 2020

Doesn't bother me either way... I've already made these available at https://github.com/DualBrain/Samples/tree/master/SourceGenerators. Additionally, it was only, in part, "mechanically ported" - a lot of hands on work went in to march it forward as being more VB-ish. In any case, I was asked to submit it... if it's not desired, you won't hear any boohooing of not accepting it from me.

@DualBrain
Copy link
Contributor Author

DualBrain commented Dec 31, 2020

Will leave another note regarding potential "value"... want to point out that the existing samples use many very C# specific concepts/language features that are absolutely ALIEN to, well, ALL VB devs who don't have any interest in learning (and keeping up with the constant) C# changes. Off the top of my head there is usage of pattern matching, tuple deconstruction, nullable, etc. None of this is in VB and isn't planned on being there any time soon. So if the desire is to not have VB specific samples... please reconsider how the code is written for examples showing concepts so that concepts/features that do not exist in VB aren't utilized all over the place. At least, that way, a mechanical conversion could be reasonable/feasible.

IMHO, one shouldn't have to learn foreign concepts about another language, spend the time figuring out out to transform the concept into their language, in order to leverage a feature that is specifically designed to be leveraged by the language that they are using.

Also, by not having samples for a particular target audience; it creates an artificial barrier to entry as it gives the immediate appearance that said feature "isn't available". "No sample, no feature." Only a very few will ever venture deeper... so it acts as a limiter to acceptance and usage by that particular audience. If this is intended, then understandable.

CC: @KathleenDollard

@KathleenDollard
Copy link

KathleenDollard commented Jan 2, 2021

Sam, you've got some good points. I think we should chat about samples after the first of the year. As C# samples embrace new styles, the point about it becoming more and more difficult to convert is real. Also, VB samples will not need to be updated to keep them from looking stale, as the language isn't expected to change. They could become out of date when we obsolete or offer new approaches, of course.

@jmarolf
Copy link
Contributor

jmarolf commented Jan 4, 2021

We already have duplicate samples for both VB and C# in all other areas. I am fine accepting this pull request in principle.

@DualBrain
Copy link
Contributor Author

Resubmitted as a different pull request since I couldn't figure out how to "rebase"; so started over using #692

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

Successfully merging this pull request may close these issues.

4 participants