-
Notifications
You must be signed in to change notification settings - Fork 256
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
Conversation
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. |
@@ -0,0 +1,23 @@ | |||
{ |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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. |
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. |
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 |
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. |
We already have duplicate samples for both VB and C# in all other areas. I am fine accepting this pull request in principle. |
Resubmitted as a different pull request since I couldn't figure out how to "rebase"; so started over using #692 |
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.