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

Visual Basic Community #250

Open
KathleenDollard opened this issue Feb 4, 2018 · 131 comments
Open

Visual Basic Community #250

KathleenDollard opened this issue Feb 4, 2018 · 131 comments

Comments

@KathleenDollard
Copy link
Contributor

I am all about community. As a community, we can improve the experience of Visual Basic programmers.

What does that mean to you?

How do we best do that?

@KathleenDollard
Copy link
Contributor Author

@AdamSpeight2008 said:

A wiki / use of the projects feature on this repo would be a nice addition, may also attract contributor to pick off outstanding tasks.

...
Hints and Tips / Documentation.
Writing VB Analyser
Writing VB Code Fix
Parsing
Semantics
Binding
Lowering

I'm fine with a wiki here for this, if you convince me that's where people will find it.

Are you interested in contributing to the documentation? It's OSS in GitHub and is one of the things considered for MVP. If you are interested in being an MVP and you want my suggestions, I'm happy to help. I offered to do that when I was in the community, and don't see a reason to change (I can't magically make someone an MVP. You make yourself an MVP, but I can help you not be overlooked.)

@KathleenDollard
Copy link
Contributor Author

Who is the Visual Basic community?

Is it a few hundred people trying to do cutting edge stuff frustrated by a language that doesn't have as much support as C# and hundreds of thousands of people working on legacy apps they are afraid they will break if they change anything?

(To reassure, I am not asking this question in the context of strategy, but in the context of how we build and support community)

@ocdtrekkie
Copy link

@KathleenDollard I can only speak for myself, but VB6 was the first language I learned, and despite having worked in C#, PHP, and C++ before, when I think of how something works, my mind thinks it in VB, and then I translate. So when it came to my hobby project... Visual Basic was just the most natural choice. (And the ability to convert everything to C# if the language gets abandoned is certainly a big plus.)

Personally, I wrote a home automation controller slash personal assistant thing. It also now runs in my car. I am bad at programming, but my project is fun. ;)

@AdamSpeight2008
Copy link
Contributor

AdamSpeight2008 commented Feb 4, 2018

There is the classic joke

Visual Basic programmers like their family and want to spend time with them.
CSharp programmers don't.

@AdamSpeight2008
Copy link
Contributor

AdamSpeight2008 commented Feb 4, 2018

@KathleenDollard

I'm fine with a wiki here for this, if you convince me that's where people will find it.
I've added a new directory to add further documentation. See PR #253

The sections will in time be filled with more information.

@KathleenDollard
Copy link
Contributor Author

@ocdtrekkie What platform (what .NET) did you use?

@Bill-McC
Copy link

Bill-McC commented Feb 4, 2018

Trust, stability, longevity, adaptable, empowering.

I personally believe the biggest issue facing VB is it simply not working with Microsoft's evolving vision. That's a huge problem and in many ways is happening as we speak. The question is how do we future proof VB ? What levels of adaptability does it need to work and continue to work across the plethora of .net ?

@ocdtrekkie
Copy link

ocdtrekkie commented Feb 5, 2018

@KathleenDollard WinForms targeting .NET Framework 4.5.2 at the moment. My attempts to do things with WPF tend to end in failure, and it's not super dependent on UI to begin with. (I originally hoped to factor out the form entirely and make it a service, but the version in my car is super dependent on a textbox at the moment.)

@bandleader
Copy link

bandleader commented Feb 5, 2018

@KathleenDollard I am all about community. As a community, we can improve the experience of Visual Basic programmers. What does that mean to you? How do we best do that?

  1. Keep VB up-to-date with features developing in the programming world, so VB stays relevant as a powerful and efficient language more modern development.
    (C# features in particular, since they've already been vetted for .NET, and also can probably be implemented more easily while/after doing so for C#.)
    Past examples: interpolated strings, Async/Await, ?.
  2. Pioneer more great features/extensions -- @AnthonyDGreen always raised great ideas, along with many others here. We can pave the way for the rest of the world; we don't just have to copy-cat!
  3. Ensure VB can be used wherever .NET runs: ASP.NET, Xamarin, etc.

More on 2

In fact, we are uniquely positioned to offer new features, especially those called "sugar." This is because VB's advantage (to beginners and pros alike) has always been its position as a concise, expressive, highly readable language. (Even from its BASIC roots. Think of our For loops vs. C-style for loops). Therefore, our devs love sugar, request sugar, and are very good at introducing sugar.

More on 3

If this cannot be done properly, then the next-best solution would be for .NET to allow inclusion of VB code in non-VB projects. That way, project templates and emitted designer code would be in C#, but we could write the app-specific code in VB. (This was being discussed in #211, but can most simply/feasibly be done with separate *.vb files, not with compiler directives.) @Bill-McC This may be a solution to your comment.

@bandleader
Copy link

bandleader commented Feb 5, 2018

@KathleenDollard Who is the Visual Basic community?

Speaking for myself:

  • Learned back in the VB6 days. Was absolutely overjoyed with VB.NET: real OOP, amazing as-you-type compile experience, great upgraded WinForms controls and designer, great .NET BCL, etc. etc. etc.
  • Was even happier with ASP.NET, even happier when MVC came out to make things cleaner, even happier when NuGet provided access to a great .NET open-source ready-to-use package ecosystem...
  • Things looked wonderful. New language features made me more and more productive. They also let VB do anything C# could; plus, for people like us, it was much more readable, expressive, and concise. And it looked like it was only getting better.
  • Was extremely excited when .NET Core was announced, as .NET would be doubly powerful as cross-platform (and stay relevant against Node), and just as importantly, triply as attractive an ecosystem being open-source. Also Xamarin looked really exciting -- no longer would .NET be 'excluded' from the mobile platforms.
  • But then something seemed to happen at Microsoft, and it seemed VB was slowly getting left behind: few language features being added; new features coming only to C#; sub-par VS support for some that did get added; and near-complete exclusion from new technologies such as ASP.NET Core and Xamarin.
  • Then, MS confirmed our fears in a blog post by @MadsTorgersen.
  • At this point, because I don't know where VB will be in a few years, I have often been starting new projects in C#, which is sad because I vastly prefer VB's superior syntax.
  • Moreover, for the same reason, I have unfortunately stopped recommending that beginning programmers learn VB -- I would rather they learn something they can get a job in down the road.

Thank you

...for this initiative. I think a lot can be done to build up the community.

@bandleader
Copy link

bandleader commented Feb 5, 2018

@KathleenDollard Is it a few hundred people trying to do cutting edge stuff frustrated by a language that doesn't have as much support as C# and hundreds of thousands of people working on legacy apps they are afraid they will break if they change anything?

The "community" here on Github is the first group. Possibly the hundreds of thousands of maintainance-only devs you refer to indeed exist; they're just not active members of the community.

That said, the more important questions are, IMHO:

  1. Can we iterate on and improve VB without breaking existing code? (Of course; in every issue we discussed how not to break -- @AnthonyDGreen did a great job at ensuring this.)
  2. Is the first group significant enough? Or at least, could it be again, if VB would get the attention (and $) it needs to be viable against both C# and Node? (Yes, but see 3.)
  3. Assuming the VB team explains things, would Microsoft be financially interested in changing the VB story, and giving it the resources it needs to compete in today's world?

...Only you have the answer to that.

@Bill-McC
Copy link

Bill-McC commented Feb 5, 2018

@bandleader Yes. I think addressing the issues of #211 is probably the most important thing to give VB an extended future.

@rskar-git
Copy link

@Bill-McC I sincerely doubt that #211 will do anything in regards to giving VB an extended future. What we need to think on instead is what new essential language features to incorporate into VB proper, and which should take priority. The language mix-in concept of #211 is just too big a task to be practical.

In the meantime, if one must employ another language for a feature which VB lacks, inter-operating with other managed code can already serve the need, and there are straightforward ways to either merge or embed DLL's from other languages into your VB assembly.

@bandleader
Copy link

@rskar-git See my response to @KathleenDollard above with the "three points of frustration" for VB developers today. One of them is the about not being able to use VB with newer project types whose developers are only support C#. On another thread, it was suggested that this could be solved by allowing VB code in C# projects. That way, we could use the existing C# templates, and just code our app-specific code by adding .vb files. -- Hence the reference to #211. 😃

@Bill-McC
Copy link

Bill-McC commented Feb 7, 2018

@rskar-git What point is there adding new features when the language won't run there ? Point me to all the new open source VB libraries out there ..... (well at least I can hear the crickets... relaxing isn't it)
As Kathleen said in her opening:

Is it a few hundred people trying to do cutting edge stuff frustrated by a language that doesn't have as much support as C# and hundreds of thousands of people working on legacy apps they are afraid they will break if they change anything?

I've watched over the last decade and a half many if not most of the leading VB community slowly but surely abandon it due to the on going frustrations Kathleen talks about.

Your proposal to think on new language features for VB without addressing the elephant in the room is a bit like saying what new features we need on WP10 or writing a new web app with FoxPro ;) The writing is on the wall, we need to adapt to survive not just plant a few more seedlings and prayers.

And we need to stop following the leader, because all VB can ever be is let behind if it takes that approach.
I LOVE LOVE LOVE the idea of VB being able to add that bit of code to massive C# libraries. It's like the goodness of VBA expanding to all .NET platforms. it would be a keystone to focusing on an accessible language, on doing those concepts KittyHawk started on but never quite got.

@paul1956
Copy link

paul1956 commented Feb 8, 2018

I may have said this before but the reason to need C# code in a VB project is to support things that VB can't or shouldn't support (unsafe comes to mind). As long as I can call all C# libraries (slice for example) I wouldn't need VB extended (much) but without support for unchecked it is difficult for most people (include me) to implement Hash and Roslyn's Hash routines are private and are spread through many files. Being able to have one line of C# code in my VB project solves a lot. Below is a simple example of where it would be extremely useful.

Dim x as integer
#C
x = unchecked((currentKey * (int)0xA5555529) + newKey)
#end C

@rskar-git
Copy link

@Bill-McC When @KathleenDollard said "Who is the Visual Basic community?", etc., I took that as a suggestion of two camps within it: One camp that is "frustrated", and the other that is "afraid". If I'm reading the mood right, it seems it's mostly the frustrated ones (people like us?) who now dominate "github.com/dotnet/vblang".

A motivation for #211 is (as @bandleader has expressed) "not being able to use VB with newer project types whose developers are only support C#". But hanging hopes on any developments for #211 is a long shot at best. We've already heard from @gafter (Language Designer and Compiler Developer on the Roslyn team). I'm not holding my breath.

Your proposal to think on new language features for VB without addressing the elephant in the room...

Please hear me out. The real path forward is in finding-out what level of effort it takes - and what obstacles there are - in adapting a C#-centric project into something usable for VB. I'd bet if one or a few of us VB'er types offered to do the adaption work, darn near all of them "C#-only" folks would cheer us on.

I do see two pain-points: (1) usage of case-sensitive naming schemes to their public and protected identifiers (e.g. protected foo and public Foo); and (2) commingled checked/unchecked integer ops. Those two things really ought to be addressed via new language features for VB. The rest - such as operators not in VB, and unsafe code - can be handled with extending the library/framework and refactoring.

Point me to all the new open source VB libraries out there ...

Yeah, I hear you, it's surprising that VBA gets more attention (if PYPL is to be believed). Yet from the start when VB was transitioned from its p-code/COM/native world into the new .NET one, it was very clear that C# was the center of attention. And it was a very disruptive time; the migration wizard was horrible. What we are experiencing are the ripples of those rocky times and decimated mindshare (e.g. from 2005, https://blog.codinghorror.com/the-slow-brain-death-of-vb-net/).

But, if TIOBE is to be believed, VB (as in VB.NET) is still in the top ten. (Hey, for a brief shining moment in December 2016, VB was ahead of C#!) So it's not over. I'd say by about Visual Studio 2010, VB finally found some of its old footing again, and things got much better with Roslyn. And now here we are, discussing the future of VB on github!

@KathleenDollard
Copy link
Contributor Author

@paul1956 I'm a little slow on the checked/unchecked issue. Does this happen I code with high performance demands or on Int64? I can imagine ways to implement checked with a modulus and Int64, which makes me think I just don't understand the scenario. Checked is issue #33

@AdamSpeight2008
Copy link
Contributor

@KathleenDollard
I believe that the community on here VBLang repo, are some what interested in developing the vb.net language. For example "It would be excellent, if VB.net did X, and here is how we can achieve it. By doing Y." The "would be nice" can be pulled from other resources and experiences, but I think the most important aspect of this repository is the how. Discussions could get technical, the good and the bad points on the approach. So we can distill what the vb.net programmers require.

Our goals should be to provide the members of the Roslyn Languages proposals, that we see are potentially viable. If is accepted by them, a Proposal Pull-Request is submitted to them, where further development can happen.

We should also be aware that not everyone on here may not have experience of corporation procedures and approaches (like Microsoft) to development. Thus may get frustrated, to what seem to them like too much bureaucracy, or the "on true way" of how things are done. We should never denigrate another's lack experience or desire to learn. Remember that our reason for this, may not align perfectly. Some may doing Visual Basic programming as part of the vocation, other for the love of the programming in the language.

@bandleader
Copy link

bandleader commented Feb 12, 2018

Regarding mixing languages

  1. @paul1956 Unsafe code was decided as not being of particular interest to VB users (though I have nothing against it being added).
  2. The reason we brought up mixing languages in a single project (Discussion / proposal: usage of any installed programming language #211) here is not to get access to C#-only features. It is to allow VB to be used for newer project types such as Xamarin/ASP.NET Core.
  3. @rskar-git Similarly, this use case cannot be solved by simply using two assemblies, because 1) a new project should generate exactly one project of course, and perhaps more significantly because 2) mixing actual project code, especially designer-generated code, requires partial classes. (I believe this is mentioned in Discussion / proposal: usage of any installed programming language #211.)

@bandleader
Copy link

bandleader commented Feb 12, 2018

@KathleenDollard I've been following #211, and I have what to suggest there, but I decided to come here first, because it's not relevant until we have some transparency Microsoft regarding their plans for VB. Based on the activity in the repos, I am not sure if the issue is technical.

  1. Let's say I do have a viable option for adding the feature (or any other feature). Will the Roslyn team (more than one person) collaborate with us in the normal fashion of OSS projects, discuss implementation, and assuming we have a good plan, implement it?
  2. Or, does MS want to focus only on C#, and is unwilling to dedicate resources to VB (beyond bugfixes and some small improvements here and there)?
  3. Or, does it run even deeper than that, and MS prefers that VB not be too viable for advanced development, because they want C# to be the only language for that?

Some transparency would be wonderful; otherwise, we're just turning wheels.

Thanks for your work on the VB language, and for championing its case (and that of the VB community) to the Roslyn team and to Microsoft.

@KathleenDollard
Copy link
Contributor Author

@bandleader

These are good questions, not just related to #211. I'll keep the discussion of #211 in that issue.

  1. Like C# and .NET there is a very high bar for accepting contributions. When we consider an issue, we will consider it to determine the best approach without bias to approaches that have been prototyped.

Like C# and .NET the deepest value of OSS is the early conversations, discussions and throwing darts at any proposal put forward, no matter who it is received from. This conversation should be broad ranging and embrace every person here. But as we move towards decisions, we need to give weight to the knowledge and experience of the people that designed Roslyn and have dedicated many years to maintaining Visual Basic.

We will collaborate at many levels, including assigning a buddy for any proposal that is moving into the Roslyn code base.

In the effort to create a new feature the act of writing the code for something as complex and carefully maintained as a major language interacting with a complex and evolving framework: the effort to write code is not close to the largest portion.

  1. Microsoft will continue to work on Visual Basic. The transition of leadership from @AnthonyDGreen has certainly slowed down the process recently, particularly in communication. The lack of LDM notes is my fault (I've had a death in the family which is not helping me get things done).

  2. Microsoft is a big company so I can't speak for everyone. I can speak for .NET in confirming the Visual Basic Strategy.

VB is not pushing all new advanced development strategies, at least not at the pace of C#. The goal is to push the right strategies. Where new strategies are not pushed, it is not because Microsoft wants C# to be the only language, but because the vast, vast majority of developers on new technology work in C# and when a somewhat advanced strategy was attempted (Razor), uptake was very low. Strategies that help VB developers in all new and old workloads (performance, maybe flagged enums, pattern matching, a fresh look at interfaces, etc) appear to have a broader impact on Visual Basic developers than advanced development strategies.

Feel free to keep asking tough questions.

@ghost
Copy link

ghost commented Feb 12, 2018

@KathleenDollard

but because the vast, vast majority of developers on new technology work in C#

And that's because it is only available for C# - yes again frustration.
I brought up #211 because of this.
And also because of this, I told my daughter, who is a beginning programmer, to specialize in C# (even though she loves VB).

VB should be the language that enables you to do Rapid Application Development, build fast and stable applications in as less time as possible,

When I look at new C# functions, I see a lot that make much more sense in VB than in C#:

  • (Non)Nullable references (as part of a RAD system; no more null pointers in a system that does not support pointers)
  • Switch statements with patterns (less explicit casting means faster development)
  • Local functions (The old DefFn)

And that combined with the fact that there are blogs about the future functions of C# and previews of the next version of C#, lots of example code in C# - but none of them for VB, gives me a bad feeling
for the future of VB.

@ocdtrekkie
Copy link

ocdtrekkie commented Feb 12, 2018

A highlight example is that Windows Template Studio just gained support for VB. If VB is the beginner language, this should not have happened, because Windows Template Studio makes far more sense for VB users than C# users. It should've been a VB first technology.

@ericmutta
Copy link

@KathleenDollard Who is the Visual Basic community?

First, let me say how awesome it is that the question is being asked by someone in charge of VB going forward 😄

Now, to answer the question from my personal viewpoint: I started using VB since the VB5 days. It is the only thing that has managed to keep my attention for 20 years straight while loving every minute of it. The only way anything can do that is if it vibes with your core personality.

As as person, I WANT RESULTS BEFORE (OR IDEALLY WITHOUT) CEREMONY...and the thing that keeps me using VB is that this language really really gets that.

So who is the VB community? I would say it is made up of people who:

  1. WANT RESULTS BEFORE CEREMONY.

  2. WANT RESULTS WITHOUT CEREMONY.

The elimination or reduction of ceremony is the reason for VB's reputation as the ideal tool for RAD. It is also why people find it easier to learn...and it is also the reason for some negative aspects in cases where ceremony is required but people skip it.

The word "ceremony" here refers to everything that is not considered core to the task at hand, so let me give examples of both.

For RESULTS BEFORE CEREMONY the best example is the form designer seen in the early pre-dotNET days. You opened the IDE, created a new project and hit Run. There on the screen was a complete form, you could move it, resize it and close it all without writing a single line of code...all BEFORE THE CEREMONY of deciding what to put on the form and what code to write to make it do what you want. Compare that experience to the one for using C/C++ and you see why VB attracts people who just want to get the job done. To be sure the ceremony is important (knowing the internals of your tools makes you a better engineer) but VB give you option to get results FIRST and worry about the ceremony (the details) LATER if you were at all interested.

For RESULTS WITHOUT CEREMONY there are so many examples and this is where VB really really shines. Noticed a bug in your running program and want to make a small fix? Just pause, edit and continue (no stop, build and restart required). Finished typing a line of code and want to move to the next one? Just hit enter (no semicolons required). Named your variable Foo but have just typed it as foo? Never mind, the editor will just recapitalize it back to Foo for you and they mean the same thing (no case sensitivity). Want to work with XML directly in your code? Just paste it and carry on with your life (no string concatenation required). Want to execute code based on the first true condition among several? Just do Select Case True and be on your merry way (no if-else-if cascade)...it just goes on and on!

You will note that a good number of the "no/less ceremony" features are about TOOLING NOT LANGUAGES and at the end of the day that is what impacts our productivity as programmers (not issues of syntax where we can debate endlessly then all go back to using what we liked anyway). Microsoft understood this deeply when creating .NET and Visual Studio which is why it always sucks when one language gets tooling support before the others (e.g the whole Xamarin/ASP.NET Core stuff).

So in closing and to reiterate: THE VB COMMUNITY IS MADE UP OF PEOPLE WHO CARE DEEPLY ABOUT TOOLS THAT ELIMINATE OR REDUCE CEREMONY...and for cases where ceremony is important (e.g. declaring your variables before using them) the VB COMMUNITY IS MADE UP OF PEOPLE WHO WANT BOTH CHOICES (e.g via Option Explict On/Off).

@ghost
Copy link

ghost commented Feb 13, 2018

For the question "Who is the VB community?", I can only answer for my self - therefor a short profesional biography, what I build, what I use and what I need to do my job.

I started out as a hobbyist in the 80ties - using Sinclair ZX81 (when I was 12 years old), Spectrum and QL.
Then, in the nineties on Windows 3.1 and later, I started out as a professional Delphi programmer - used it from version 1 to 3 (before that: Turbo Basic, Turbo Pascal and PDS 7.1 on MSDOS).
After that, I switched - because of the market - to VB5, followed by VB6, VB.NET 2005, 2008 AND 2010.
I skipped VS2012 and VS2013 (I did like the 2010 IDE better and there were not enough changes that I could use in VB) and worked next in VS2015. As soon as VS2017 came, I switch to it.

I build LOB applications, complete ERP systems, system couplings, EDI systems and SQL Server performance improvement tools - all with VB.Net.

The technologies that I most use are Winforms, SQL Server, Web services and Windows CE (my customers still use those devices). Because of the habit of Microsoft do introduce new technologies and drop them a few years later (examples: Lightswitch, Silverlight, Windows Mobile), I am always hesitating to adopt something new - first see if it will survive, because my projects have a lifespan of 20 years+.
And because of this lifespan, it is also very irritating that legacy technologies are not working anymore in new versions of Visual studio - for example, I still have VS2008 installed for Windows CE support - Why is it not supported in VS2017; you don't have to improve it, don't have to (official) support it, but please - include it, because it is still in use in the real life and has to be supported for the companies that use it.

What I need is a stable system (VS2017 isn't really stable when used on a terminal server),
What I need is that bugs are solved (instead of giving me work-arounds and leve the bugs unfixed)
What I need is that legacy and abandoned technologies are included in the most recent version of Visual Studio, because he chance is that I used it for a project that has to be supported for many years.
And last: what I need is all you can think of to make programming of fast and stable solutions an easier task.

@ghost
Copy link

ghost commented Feb 13, 2018

To show a case how I think VB should work (in opposite to C#; VB should do things for you as a RAD tool):

I want to write a file - i use the VB My class for it (and if you see the code, I suspect the My class was build by a C# developer, because I have to check and do everything myself):

'Check if the directory exists - if not, create it
If Not My.Computer.FileSystem.DirectoryExists(path) Then
    My.Computer.FileSystem.CreateDirectory(path)
End If
'create the file - overwrite if it exists
My.Computer.FileSystem.WriteAllText(path & "\" & FileName", FileContent, False)

How it should have been (with a VB mind):

'create the file - overwrite if it exists and first create the directory if it doe not already exists
My.Computer.FileSystem.WriteAllText(path & "\" & FileName", FileContent, vbAppendToFile.No, vbDirectory.CreateWhenNotExists)`

@benaadams
Copy link
Member

benaadams commented Jun 7, 2019

Not exactly. VB doesn't support pointers, therefore span code in VB is still safe.

It still isn't safe as you may have got the span from a C# program that stackalloc'd it; if you store that in the heap when you later update it you are randomly overwriting a different thread's stack space; which would be very bad.

@Berrysoft
Copy link

@Nukepayload2

If you turn off Option Infer, your code will throw an exception. Because ref struct can't be converted to System.Object. The VB compiler should prompt a compile-time error for this case.

Yes, but Option Infer is on by default.😁

@Berrysoft
Copy link

@benaadams

It still isn't safe as you may have got the span from a C# program that stackalloc'd it; if you store that in the heap when you later update it you are randomly overwriting a different thread's stack space; which would be very bad.

You can't return a Span with stackalloc'd array in C#.

@DualBrain
Copy link

I was considering not adding to this already extremely long thread; however...

In my mind, the most basic responsibility to hold Microsoft accountable can be summarized to that there should be an expectation that what ships "in the box" (for .NET) should all "just work".

"VB, C#, F# should be able to target (insert .NET technology stack here) and just work."

If it a technology stack doesn't adhere to the above statement... DON'T SHIP IT!!! (Span, I'm looking at you...)

Another key responsibility is that Microsoft "DOESN'T BREAK MY S#$T!!!!!".

This is, on it's own, is probably one of the hardest things to accomplish and, unfortunately as some have pointed out in this thread, means that VB will have to adopt new core language features more carefully (aka slowly). AND THIS IS OK!!!!

So what does this mean?

There is a serious shared mindset problem. So let me start of by saying the following:

"I don't use VB because others use VB... I use it because it's what I want to use."

And... as it turns out... there are indeed more people out there with the same attitude. This is a good thing. I'll add:

"I use VB because it is the BEST language."

If you are still using VB... you most likely agree. We need to stop be self-deprecating. We certainly don't need to be reiterating what the people who don't use VB say about us. NEWSFLASH: None of this is new. Everyone has been speaking about the demise of VB pretty much starting with VB 1.0. Oh wait... it started BEFORE that... BASIC has been "dying" since... oh, I don't know... 1964. Humans are "tribal" by nature... there is a natural tendency to classify groups of people in the "us vs. them" organizational structure. Reading through this thread, I've noticed something that is somewhat interesting (at least to me).

There are many commenting that are relatively new to VB. The newer seems to be more concerned the the overall public perception of VB. While those that have been around a while are less concerned about this and more concerned about Microsoft's ongoing support and the overall stability of not just the language but the underlying technologies that are touched.

I've reconciled the fact that, as a VB proponent, that I will continue to snubbed by some. Does that put me in a negative mindset... NO. The net effect for me is exactly the opposite. It challenges me to ask some key questions:

  • If something "can't" be done in VB, is it worth doing?
  • If it is "worth doing"... then figure out a way to "just do it".

Again... none of this is new. The same thought process has been happening (at least for me) for the past 30+ years.

I think one of the biggest things that is negatively affecting the VB Community is one of confidence (or the lack thereof). We certainly do not need to be constantly comparing ourselves to C#. This is not to say that we don't continue to innovate, I'm just stating that we don't need to constantly compare ourselves to just C#. We shouldn't be moving forward in lock-step with C# simply because it is the "cool kid". Conversely, C# should be more considerate to the CLR... understanding that there is, in fact, more than one language running on .NET. ;-) With that out of the way, we should stop allowing other developers to criticize our choice... our choice doesn't (and shouldn't) have to be their choice and the reverse should also be true. .NET provides us the BEST opportunity for this; if we want to be critical of anything, it should be that NO language should be able to dictate (break) this. With that said, if some innovation is done (regardless of language) that will be adopted and exposed through various Microsoft technology stacks... then I refer you back to the beginning of this post. ;-)

Not one to shy away from a potentially heated discussion with regards to VB vs. (WHATEVER); for many years I've been completely polite about saying "equal" or "just as good". Those days far are behind me...

There's so much more to say on this subject, so close with a few quotes:

"BASIC is the BEST computer programming language EVER invented!" -- Cory Smith
"VB on .NET is a GREAT version of BASIC!" -- Cory Smith

:-D

@benaadams
Copy link
Member

You can't return a Span with stackalloc'd array in C#.

You can however be called with a stackalloc'd span; either directly or via a delegate. All the languages interop with each other so the rules on Span are important.

Span<T> and Memory<T> are good for VB as they are much safer than ArraySegment<T> as they have enforced bounding on their window, which ArraySegment<T> doesn't have.

However Span<T> (and ref structs if they are included) must still stick to the stack only semantics; otherwise VB libraries that use Span<T> become invalid to use from other languages and VB programs become invalid to give Span<T>s to (including from the runtime).

@Berrysoft
Copy link

@benaadams I still can't see which scenario leads Span to unsafe. Here's my opinion: 1. Span doesn't only contains stackalloc'd array, but also common(heap) array. 2. If the method is called with a stackalloc'd span, the span is always valid. Can you show some code that other languages make VB programs become invalid with Span?

@benaadams
Copy link
Member

benaadams commented Jun 7, 2019

I still can't see which scenario leads Span to unsafe.

If a Span is allowed to be captured in a class or regular struct field; then it can create an invalid program

Public Class Class1
    Private span As ReadOnlySpan(Of Byte) ' This is invalid

    Public Sub OnValue(span As ReadOnlySpan(Of Byte))
        Me.span = span ' and this must be prevented
    End Sub

End Class

So if I had a VB parser

Public Class Parser
    Public Function OnValue(span As ReadOnlySpan(Of Byte)) As Integer
        ' unknown
    End Function
End Class

Can I call it with?

public int ReadData()
{
    Span<byte> data = stackalloc byte[256];
    // ...
    return Parser.OnValue(data);
}

If VB just ignores the Obsolete attribute and allows the Span to be stored to heap; then the VB is not safe to call from the C#.

@Berrysoft
Copy link

@benaadams Of course the compiler can't allow to store a Span in the heap. It's my fault to treat it too simple, but it still not hard to allow using Span in VB.

@benaadams
Copy link
Member

Of course the compiler can't allow to store a Span in the heap. It's my fault to treat it too simple, but it still not hard to allow using Span in VB.

I assume that's the hard bit; everything else should just work.

@WolvenRA

This comment has been minimized.

@ericmutta
Copy link

@benaadams @Berrysoft the Span<T> discussion seems to be very detailed and could probably use a seperate issue to get full treatment there without making this very long thread even longer 👍

@terrajobst
Copy link
Member

@WolvenRA

I understand this is passionate subject but please don't use wording like "I too am sick of the bigotry spewed by the C# fanatics". While you didn't accuse anyone of anything, it's a direction that isn't productive and is ultimately not helping you to convince anyone either.

@terrajobst
Copy link
Member

terrajobst commented Jun 7, 2019

@Berrysoft @jmarolf

The fact that a type is in .NET Standard doesn't mean that all languages are expected to support it. We can slice the BCL in only so many ways and cross-platform, size, app-models, and low complexity are also desirable traits.

From the start, .NET has had the notion of the CLS (Common Language Specification). Some types, such as unsigned types, weren't included. We're trying to make sure that we don't introduce new scenarios that require the use of Span<T>. That's partially because VB doesn't support them but also because many languages also aren't. And even in C#, Span<T> is somewhat of an advanced type with additional constraints (specifically the ref-like behavior). So everyone wins if mainline scenarios can be achieved without them.

You might think "hold on, your team added a ton of APIs that only support span". That is true but none of them allow you to do something that you can't already do (like all the new APIs around encoding, parsing, and JSON are span-based alternatives to the existing APIs such as Encoding, Parse, and Newtonsoft.Json).

In a sense, spans are very similar to how we deal with pointers in the BCL. Virtually anywhere where we support them, we also offer ways that just involve string or byte[]. And in the cases where we only accept pointers you're already into the weeds of unsafe/low-level interop. Span is very similar. We had a few instances where we violated this. For example, we added the new Path.Join() method that only took ReadOnlySpan<char>. We've since then fixed that by adding overloads for string.

So VB shouldn't be concerned that it loses the access to core functionality due to span. But of course, supporting it would allow developers to push the envelop more in terms of performance, but the question is whether that's an interesting angle for the VB customer base. That's a decision for @KathleenDollard and the VB community.

@terrajobst
Copy link
Member

terrajobst commented Jun 7, 2019

@DualBrain

"VB, C#, F# should be able to target (insert .NET technology stack here) and just work."

If it a technology stack doesn't adhere to the above statement... DON'T SHIP IT!!! (Span, I'm looking at you...)

I agree with you that the product needs to be self-contained but considering the size of the languages and the framework we can't test each and every combination of features and languages. We're trying extremely hard to be mindful when designing the languages and the key exchange types in the BCL but we make mistakes.

However, we explicitly allow certain scenarios to not work in certain other scenarios. Otherwise we'd design the lowest common denominator, which, considering how many scenarios .NET supports, wouldn't be useful. The trick, if you will, is to make sure that (1) it's not the norm (2) it doesn't hamstring mainline scenarios and (3) customers have a way to reason about this.

For span, see above. I think we've struck a reasonable balance between these goals.

"I don't use VB because others use VB... I use it because it's what I want to use."

I agree a hundred percent. Language choice is a very personal thing and it's hard to explain why one likes some languages and not others. I, for one, cannot stand reading code that involves a lot of words over symbols; I found it too taxing. That's why I liked Object Pascal more than Basic and why I liked C# more than Object Pascal. At the same time, I prefer productive environments over others that make me write a ton of code with my bare hands. That's why I preferred Delphi (Object Pascal) over Visual C/C++. And since .NET felt as productive as Delphi but offered more features I jumped on that as soon as it came out. And I've been there ever since.

At the same time we cannot ignore market trends. While individuals have preferences, so do groups. And that's where we have to realize that not all preferences are created equal. There are probably some people that would prefer to write .NET code using Hyper Card. But we can't invest in a product that has a maximum market share of 5 people.

Of course the market share of VB is hundreds of thousands of people -- that's a customer base many other companies would dream to have. So it's not like VB isn't worth investing in. But the resources are split between C# and VB and it's not possible for us to invest in both equally because it just doesn't make sense from a business point of view.

Oh wait... it started BEFORE that... BASIC has been "dying" since... oh, I don't know... 1964.

Agreed. I've never understood the argument of age. LISP is around forever and is alive and kicking. So is C. Just because something is old doesn't mean it can't be a good concept. Look at Unix. The architecture, tools, and languages are around for a long time. And yet there is a growing set of young people finding it attractive and swear by it. Whether something is desirable or not isn't decided by fiat, it's decided by the people using it (or not).

@terrajobst
Copy link
Member

terrajobst commented Jun 7, 2019

Oh, and @DualBrain needs to become a meme now:

image

@benaadams
Copy link
Member

So VB shouldn't be concerned that it loses the access to core functionality due to span. But of course, supporting it would allow developers to push the envelop more in terms of performance, but the question is whether that's an interesting angle for the VB customer base.

Performance of Span is great; but I think more interesting is its also a safer and easier to use construct than ArraySegment<T>; as ArraySegment lets you access the full array rather than only the window it specifies, and you always need to add its .Offset to any element access, and check you are in the window against .Offset + .Count.

Additionally ReadOnlySpan allows intent to be communicated in an api far more powerfully than Array and without the performance hit of IReadOnlyList. Its the variant of array that has been missing for a long time.

@terrajobst
Copy link
Member

terrajobst commented Jun 7, 2019

Performance of Span is great; but I think more interesting is its also a safer and easier to use construct than ArraySegment<T>

I wouldn't advice using ArraySegment<T> for productivity or correctness; I'd rather create separate arrays. Of course, this isn't as performant, so yea :-)

Additionally ReadOnlySpan allows intent to be communicated in an api far more powerfully than Array and without the performance hit of IReadOnlyList.

Totally fair. I'm mostly being tongue in cheek but some of the safety that span provides you pay for with complexity due to the ref-like requirements. The scenarios we've optimized span for is more in the realm of systems programming where the alternatives would be even more complex than span. But many higher levels don't have those requirements and for them ordinary arrays and potentially copies are working fine. It's all about balancing.

@DualBrain
Copy link

@terrajobst I'm now a MEME!!!!!

@ericmutta
Copy link

@terrajobst: Of course the market share of VB is hundreds of thousands of people...

I have always been curious about that estimate (I don't dispute or agree with it either way because I simply have no data). As far as I can tell, everyone who does VB/C# does so from within Visual Studio, which Microsoft owns. Couldn't Visual Studio just count the number of people who use it for certain projects and report that figure daily to a public site we can all review? I imagine such data would be incredibly useful to a wide audience (not just the .NET language design teams).

For example, I would be really interested in having Visual Studio check how many VB projects out there with more than 1,000 lines of code are using Option Strict Off. If the number is "almost zero" then we can do away with that and greatly simplify the language so that the semantics of new features are easier to evaluate and implement for VB (especially for stuff like Span<T> which should ideally be cross-language because it is touching the BCL).

@terrajobst
Copy link
Member

terrajobst commented Jun 7, 2019

There are lot of problems with releasing data like this publicly. For starters, the data itself is valuable because we use it to make business decisions. And we have competitors.

But even if we did: it's very hard to measure the thing you care about accurately. I've spend a lot of time collecting API data, usually via static analysis but internally we also use other means to gather usage stats (e.g. crash dumps, profiling first party apps etc). The all have different biases. You'd be amazed how hard it is to measure things like "users" because we take privacy extremely seriously. We don't want to collect personal identifiable information (PII), partially because of compliance reasons (e.g. GDPR) but also because it's a business risk when this data is handled improperly. We have quite a bit of telemetry from things like VS but you very often cannot measure the exact thing, so you have to approximate by using other data points you then use to infer the thing you actually want to measure. And sometimes you can't even do that so you get an upper or lower bound. So we're not deliberately vague when we give estimates.

In other words, interpreting the data is hard. Internally, we have data scientists with a lot of domain knowledge that help us to get into the ballpark. But there have been cases where people looked at data and came to completely wrong conclusions that the data simply doesn't warrant. Thus, releasing this data without significant investment on providing guidance on how to read this data would be irresponsible too. So yeah, it's unlikely to happen.

For example, I would be really interested in having Visual Studio check how many VB projects out there with more than 1,000 lines of code are using Option Strict Off.

This a perfect example of something that is hard to measure. Sure, it's easy to write code that precisely measures what you're asking, but we can't hard code specific data collectors whenever someone has a question like that. So we collect generic data points. I'm not working in VS, so I don't know what we're actually collecting, but you can imagine that we don't actually collect the LOC but the bucket (e.g. <1k, 10k, 100k, 1m, >1m etc). We for sure don't collect source code but AFAIK we also don't collect telemetry on project settings so things like Option Strict Off might be even harder.

If the number is "almost zero" then we can do away with that and greatly simplify the language so that the semantics of new features are easier to evaluate and implement for VB (especially for stuff like Span<T> which should ideally be cross-language because it is touching the BCL).

Now this is an interesting one. While your assumption sounds reasonable it's problematic and a mistake virtually all PMs at Microsoft did one time or another. Just because something is rare doesn't mean it's not important. In .NET we strive for a linear learning curve (meaning simple things should be simple and more complex things possible, ideally with an increase in cost that is proportionate to the value you can realize). This is hard. Sometimes you need to cut some advanced scenarios in order to avoid causing too much complexity for mainline scenarios. But sometimes everyone has to pay a little, even in scenarios where it wouldn't matter, to keep more advanced scenarios possible.

I've zero data to back up my claim but here I go: a programming language that is extremely optimized for < 1000 lines is probably not going to work at all for projects with 50kloc. I mean we all know JavaScript, so 😈

@DualBrain
Copy link

@ericmutta One major flaw in "measuring" is simply how can you accurately measure for VB? For example, how many people use the compiler (command line) shipping with the .NET Framework. What about those that are using the Mono version of the VB compiler (not Roslyn)? Taking this a different directly, the likely-hood of anyone getting hit by lighting is very, very, very small. However, if you are that person that got hit by lighting... it 100% sucks! Removing things from the language as long as there is at least a single person utilizing it doesn't make sense. It might not affect "many", but the few will be seriously impacted by it.

@ericmutta
Copy link

@terrajobst: ...And we have competitors...compliance reasons (e.g. GDPR)...

Good point! When happily discussing these things to our collective heart's content on an open-source platform, it's very easy to forget that this is a business and there are people, budgets, laws and jail 😄

@terrajobst: Just because something is rare doesn't mean it's not important.

I totally hear you. For example VB's late binding may not be something people (should) use frequently but it is important. When you need it you probably really need it. However, this particular feature (late binding) seems to be a black hole sucking the innovation out of VB's future to the point where I am wondering if it is really really that important.

A good example is the .NET Standard 2.0. For a while in the past, you couldn't write VB code targeting that version (while C# could). And then you guys did something and it became possible. I think it was done by embedding portions of the VB run-time, which @KathleenDollard indicated is being ported to .NET Core 3 now.

VB-isms like late binding are implemented via that run-time. Many of these VB-isms are legacy stuff from VB6 which you can completely live without because they have counterparts in the BCL. And for sure they are important to someone. But 20 years later VB is still dragging its run-time forward like a chain around its neck. It means I can use stuff like On Error Resume Next and Option Strict Off but at the heavy heavy price of being unable to do stuff like write code targeting .NET Standard 2.0 as was the case in the near past.

Earlier on in the discussion about Span<T> @jmarolf said:

...VB unfortunately is more complex than F# in this scenario as we need to think about VBs unique binding semantics.

The crux of my comment is this: if VBs unique binding semantics make it "unfortunately more complex" to implement new stuff for VB, then isn't now, after 20 years, a good time to review whether we really need those (legacy) semantics?

Personally for example, if I was told "you are going to lose late binding support, but because the language is now simpler, we are going to innovate faster and support more scenarios", I would be very happy to lose late binding support.

Most of the legacy stuff has a viable work-around in VB itself or the BCL. Losing it may hurt but it is not fatal. But what do you do when you are told new features/platforms are not supported for VB? You either have to switch languages (a drastic change given how religious one's choice of language is) or just give up programming entirely and become a grumpy old git 😆

@ericmutta
Copy link

@DualBrain Removing things from the language as long as there is at least a single person utilizing it doesn't make sense. It might not affect "many", but the few will be seriously impacted by it.

That makes a lot of sense and taken to its logical conclusion it means two things:

  1. No feature (legacy or otherwise) will ever be taken out of VB in the future. If a given feature (e.g. late binding) brings with it complexity that makes it easier to add features to other languages when compared to VB, then we can expect little to no innovation for VB. Forever.

  2. Since removing stuff is near impossible, you can bet that adding stuff will be near impossible because once a feature is in, it is in forever. This probably means it will be a long long time before anything we suggest in this repo will ship (if ever).

The above grim reality probably explains why in the very long release notes for Visual Studio 2019 you can find mention of C#, F#, C++, XAML, TypeScript and JavaScript. But not VB.

One may be tempted to think that there's a secret cabal of people "holding VB back" or that Microsoft has "lost interest in it", but I have come to the conclusion that the reality is less exciting: VB is not evolving as quickly as everything else because it is really hard to evolve it.

I'd be keen on hearing @KathleenDollard's vision on resolving this "checkmate" scenario that VB finds itself in so that over the long-term, VB can keep evolving and thriving..

@DualBrain
Copy link

DualBrain commented Jun 8, 2019

There is mention of F# throughout this thread and how quickly it is evolving compared to VB. I think that is a great area to have a conversation. First, let me express that I'm not any sort of an F# expert and that I'm not totally keyed in on all of the community as a whole. However, from the outside (and my limited involvement in the past during a single hackathon) I think there are some key takeaways that I'd like to share.

From what I understand there are very few people at Microsoft that do the "hands-on" work on F# full-time; I've heard that there it's more of a "management" structure that is on the Microsoft side and most (if not nearly all) of the development work is done by the F# community. (If there are any F#-focused people reading this, please feel free to help clarify.) Regardless of what the actual makeup of this structure, it's clear that it's the overall community that drives F# forward by actually doing the work. This is AWESOME! But please don't confuse / conflate F#'s evolution as something that is somehow taking away resources from VB. Because of how that work is being done, it literally has nothing to do with VB. Additionally, if you even mildly follow along you'll find that F# suffers from a bit of "me-too"-isms every once and a while with regards to "stuff showing up in C#" or "stuff supporting C#" before it's available in F#. The difference is that it typically is the community that fills that void. Again, nothing to do (for the most part) with Microsoft.

XAML has nothing to do with VB. That's a completely different stack. However, because you bring it up... however, VB does have something C# doesn't... we can do things with XML (which XAML is) far easier than C# can.

JavaScript was, is and continues to be a mess... thank you TypeScript for stepping in. ;-)

C++… have you ever developed anything using C++ that you had to actually ship and continue to maintain. I'm not a C++ expert... but I can certainly tell you that my experience that I do have with it just, frankly, ticks me off. EVERY single time I've had a project that was necessary to be in C++ (not to be confused with C) and a new version of the language, environment, tools was released queue the ensuing nightmares of WTF head scratching errors. As such, I avoid it as much as possible for any projects.

This leaves C# (as your last comparison). NEWSFLASH! Some of the work that you are describing and attributing to Microsoft is actually being done by the community. Sure, the core stuff is being done by Microsoft... and you know what... that is true of VB.

So let's talk about VB.

You mention Late Binding as being something that is holding back VB. Or that it's the "runtime". It's none of these and yet all of these. Let me explain...

There is a conversation regarding adding "pattern matching" to VB. This talk has been going on for some time. Which goes to exactly what you are saying. However, I think it's a good thing that it's taking time (I'll come back to that more in a moment for an actual historical example).

    Select Case Today.DayOfWeek
        Case DayOfWeek.Monday,
                 DayOfWeek.Tuesday,
                 DayOfWeek.Wednesday,
                 DayOfWeek.Thursday,
                 DayOfWeek.Friday
            Dim message = "Get to work!"
        Case DayOfWeek.Saturday,
                DayOfWeek.Sunday
             Dim message = "Funtime!"
    End Select

Notice that we have message scoped within each Case. This is not something that C# does. Why do I bring this up? Simple... let's look at an alternative (that doesn't currently work).

    Dim value As Object = Foo
    Select Case value
        Case Is Bar
            value.OnBar
        Case Else
             value.OnFoo
    End Select

or

    Dim value As Object = Foo
    Select Case value
        Case v As Bar
            v.OnBar
        Case Else
             value.OnFoo
    End Select

The more I think about pattern matching in VB, it seems to me that we should probably have it two different ways. One that is totally implicit and the other that is more explicit (like C#). To me doing it the "same as C#" just doesn't feel right. I feel that in 99% of the cases, the reason why you would be doing this would dictate the first example being the more appropriate approach and (most importantly) doesn't force us to create garbage (meaningless) variables to get the job done. So why do I point out the "message" example above. Each Case has it's own scope... so this means that we could indeed have the implicit-ness I show. If we just rushed head first into implementing this in a "me too" fashion... I'd argue that VB would continue to evolve where it felt less like BASIC and ultimately what would be the point in that? In other words... if we could only have one... I'd choose the first option. If we can have both, AWESOME! If we could only have the second one... I'd rather not have it. (Please see further down as to why.)

For a little history... let me share a personal story.

There was a time when you always had to do the Get/Set on a property (the dark ages). I remember clearly that the conversation for making this easier (eventually being called Automatic Properties) was initially taking place in the "VB community". I obviously was a huge fan for the addition of this. Fast forward a little bit. I was pretty "hurt" when the feature was delivered and available C# developers leaving us VB folks out in the cold. (Amanda, you failed us! - don't stop reading) Fast forward a little bit more. I have to say that although the waiting part sucked, when it did arrive in VB... it is a FAR SUPERIOR implementation! (OK, Amanda... I was wrong.)

Let me share another story... it took me talking about something for what I believe is over 8 years. In my mind it was super simple. Others in the community thought it was simple as well. The difference is I'm a big fan of NOT CHANGING the language if we don't have to. My personal first rule of language design is to not add any new keywords. I am in no way criticizing Lucian or @AnthonyDGreen... when they were "in charge" of VB it's a hard task... it's just not that simple no matter how much we think it might be. In the end, it was done and it didn't require any new keywords! That took 8 YEARS to not add a keyword, to not make any changes to the language yet make the underlying improvement! (Thank you @KathleenDollard for helping it get across the finish line.) Imagine if it was a new keyword and there was inconsistencies added to the language because we rushed to the solution. (Thank you Lucian and @AnthonyDGreen for ensuring that a conversation had time to take place.) The long-term gain would net us a total loss... thus my first rule. ;-)

So one final history lesson. The single most action that has critically fractured the VB community was "the move to .NET". And it wasn't the move to .NET that caused the fracture... it was literally the idea (and subsequent) actions that forever damaged the image of VB. This was the notion that a few influential people who felt the same way as some do now that it would be perfectly OK to discard "the old way" in favor of the "right way". We still haven't recovered from this. Even after a lot of this damage was repaired from a technical point of view by around 2008... those that were displaced, forgotten, hurt by all of this wouldn't even give the improvements a view. This, of course, finally gives a window to VB competitors to swoop in and save the day. This is something that we absolutely cannot survive through a second round. We just can't.

Looking to the future... the MOST important thing in my mind is one of growing the VB community. This means we need to bring in new people and we need to be able to keep them. Does this mean that we do this using Span? I don't think so. Does this mean that we need to be in constant "Me Too" mode? Again, I don't think so. It's about figuring out what VB does well and we continue to do that. We need to look to our history and figure out what made us great (and equally despised) in the first place. Bring on the VB hate... the more people "hate" VB because of how BASIC it is... simply because we are catering to beginners and it is all-purpose... the ease of it's use the elegance in that... then we are doing something right. We need to stop shying away from the word BASIC... we actually need to start looking more closely at it.

Beginners - yes... the barrier of entry should be low. Additionally, because we are catering to beginners, this means that the more advanced we are... the simpler the more common tasks are meaning the less work we need to do. Just because we embrace beginners doesn't mean that the product can't be advanced. Let me quote the creators, "Advanced features have to be added so that, if there was a price, it was paid by the expert, not the novice." We think about all the features from the point of view of the novice; but that doesn't mean we don't do advanced when there basically isn't any other way to "make it simple".
All-purpose - come on!!!!! Seriously... VB combined with .NET! This should be our sweet spot. ;-)
Symbolic Instruction Code - Verbose... we got that one covered.

We constantly get criticized for the word beginners... and that's OK. What is not OK is that we are not living up to it! To me the things we need to focus on aren't the "advanced" features, but the simple ones. It's not the advanced features that are making my day-to-day development life better.. it's "the little things". (And, as it turns out, it's the little things aren't without their effort.)

We have a an already amazing language wrapped with amazing tools. The tools are were we can easily see advancements thanks to Roslyn. As for advancements in the language, we need to definitely do some introspection... not to remove / reduce... but to adjust so that we are living up to our name. With that said, if external forces dictate that we have to support feature x so that we can participate (consume assemblies) in the greater .NET eco-system... that's without question and is absolutely priority #1. If this can be done without changing the language... FTW!

Just try to keep in mind that language design is hard. Getting it right is even more difficult. It's not the surface area that is the problem... it's that the problem is getting it right is very hard.

@AdamSpeight2008
Copy link
Contributor

@terrajobst Possibly not the best person say this, given my past record.
I think Microsoft could help community members that are attempt to learn the Roslyn codebase. A rough understand of the codebase presumed, but also accept they maybe gap in their knowledge. As to foster competent contributors, so they can help maintain and provide features in the future. For example a Blocked Progress (Community) issue, say each month or so. Where we the community could ask for help, or information. Upon which the team then can assess them, then maybe provide blog / wiki posts, or provide a pull-request against their explaining an aspect of the code-base or fix.

@zspitz
Copy link

zspitz commented Jun 9, 2019

@DualBrain The implicitness you're describing -- if the compiler can know the narrower type of a referenced variable, allow using the members of that narrower type -- is not specific to pattern matching, and has already been discussed at #172.

Dim value As Object
If TypeOf value Is Bar Then
    value.OnBar
End If

@zspitz
Copy link

zspitz commented Jun 9, 2019

@ericmutta

VB is not evolving as quickly as everything else because it is really hard to evolve it.

This.

Every new feature added to any language requires a tremendous amount of effort in design, spec, implementation, documentation, testing; both for the feature itself, and for how it fits in with the rest of the language, technically and stylistically.

(I suspect -- no hard evidence -- that the VB.NET compiler does more in the background than the C# compiler does, to enable the developer to write simpler and more natural code (e.g. late binding, Select Case on non-constant, no null-checking required when raising events); this compounds the necessary effort.)

Somebody has to do all of this; the "somebodies" will come from either of two groups:

  1. Microsoft employees
  2. the language community

My understanding is that 1) the C# community is an order of magnitude larger than the VB.NET community, 2) Microsoft is after all a business, and must allocate resources in line with the respective size of the C# and VB.NET communities. There is less of a chance that all these "somebodies" will come from Microsoft.

But we as members of the VB.NET community can certainly contribute in this direction. PRs for the VB.NET compiler shouldn't have to come only from @AnthonyDGreen and @AdamSpeight2008 -- anyone can provide a PR or a specification. Admittedly, there's no guarantee of it being accepted; it might (nay, probably will!!) be discarded right away. But even a bad PR or specification will advance the sum total -- "don't do this because of X", "that is a bad idea; it doesn't go well with Y"; so now something else can be tried.

And testing proposed PRs is no less important, as is writing documentation.

Eventually, all this trial and error will move language forward.

@DualBrain
Copy link

DualBrain commented Jun 9, 2019

@ zspitz

Admittedly, there's no guarantee of it being accepted; it might (nay, probably will!!) be discarded right away. But even a bad PR or specification will advance the sum total -- "don't do this because of X", "that is a bad idea; it doesn't go well with Y"; so now something else can be tried.

100% agree! And this shouldn't dissuade people from starting/having these conversations. It is hard. It should be met with EXTREME criticism. This is natural, expected and absolutely necessary. People don't have to be mean, mind you... but criticism has to be expected and we should all go into this expecting a "No" from on the onset. If you truly believe something is worthwhile, it will take time. I've already shared a personal story on this subject. I wasn't dissuaded, I persisted. I wasn't mean. I wasn't upset... I get that language design is hard that that there isn't an "army of developers" behind all of this.

I'll share that I'm still lighting a torch (apparently I'm like one of two people on the planet) that want's inline IL. Is it a good idea.... YES! Can I prove it? Sure... look at some other versions of BASIC. Is it going to happen? Probably not. And... that's OK.

@zspitz
Copy link

zspitz commented Jun 9, 2019

@DualBrain

And this shouldn't dissuade people from starting/having these conversations.

But my point is not just hand-wringing about the apparently immovable rock that is VB.NET, or even talking about it; it's that we as the community can and should do more than just talk -- we can spec, we can implement, we can test, we can document; with the understanding that even though none of our efforts will be in the final version, they still have value by enabling the conversations that lead up to that version. (Witness the spec that prompted the LDM).

NB. My personal hope is for #172 and pattern matching.

@DualBrain
Copy link

DualBrain commented Jun 9, 2019

@zspitz Doh! Good catch. (Not an excuse... I was distracted by my two year old. ;-) ) So, yes, I meant "should not dissuade". Also, I agree 100% (and am on board) with your latest post.

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