dotnet / vblang

The home for design of the Visual Basic .NET programming language and runtime library.
286 stars 63 forks source link

Visual Basic Community #250

Open KathleenDollard opened 6 years ago

KathleenDollard commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

There is the classic joke

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

AdamSpeight2008 commented 6 years ago

@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 commented 6 years ago

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

Bill-McC commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

@KathleenDollard Who is the Visual Basic community?

Speaking for myself:

Thank you

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

bandleader commented 6 years ago

@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 commented 6 years ago

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

rskar-git commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

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 (#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 #211.)
bandleader commented 6 years ago

@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 commented 6 years ago

@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.

2) 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).

3) 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 commented 6 years ago

@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#:

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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

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)`
bandleader commented 6 years ago

@KathleenDollard Thank you for your reply. You said that you "stand behind the .NET Language Strategy." Could you explain what this is going to mean practically? i.e. if we suggest some good features here, that improve VB and do not break existing code, what are the chances that they will find their way into the compiler, and in what timeframe? (speaking in generalities)

bandleader commented 6 years ago

@ericmutta Fully agree with your comment that VB even back in VB6 emphasized results before ceremony; however, this experience was something that MS then integrated into .NET itself, and so even C# developers had the amazing WinForms designer, Edit and Continue, etc. So this does not today differentiate the VB community from the rest of the .NET community (as you described your comments, they were mostly in the tooling and "not the language").

So what does differentiate the VB language (and personality)?

I think what differentiates the "VB personality" (and indeed BASIC itself) from other language personalities is the desire for code to be extremely readable (even to humans) and expressable concisely (i.e. say exactly what you mean and no more).

THE FOR LOOP is the most obvious example in my opinion. When you want to run a loop with variable i going from 1 to 10, in C# you write for (int i = 1; i <= 10; i++) -- you actually write out the initialization statement, the loop continuation test expression, and the after-iteration increment operation statement. This allows for powerful flexibility, BUT in 98% of all you want to change are the 1 and the 10, and the rest is just noise! So BASIC slams its fist on the table and proclaims, "Say exactly what you mean, and not a character more!" ...and its version is as simple as For i = 1 To 10. There's nothing there except what you mean.

(Note that the allCustomers.Where(_.Active) that I am suggesting in #256 is also very much in the spirit of "nothing there except what you mean" -- which is why I think it is such a good fit for VB.)

SEMICOLONS are another example; C# uses semicolons to separate statements, which is very flexible -- you can continue any statement across lines and just use a semicolon at the end. BUT 90% of statements are written on one line, and in return for your power you now you have to add the semicolon anyway -- which is just adding noise. So BASIC says, "Skip the semicolons. We'll detect multi-line statements where we can. For the remaining 2%, simply use a line continuation character." Voila, your code is much more readable -- there's nothing there except what you mean.

CURLY BRACES are yet another example; C/C# uses curly braces to wrap statement blocks, which is very flexible -- you have full control of block start and end, independent of line breaks. However, in 93% of cases you're going to put your first statement on the next line (and indent), add a few more statements on more lines, then close your block on the next line. If so, the nesting levels of your blocks are more visibly conveyed by your keywords and your indentation -- and the braces simply add noise. Moreover, the closing braces don't make clear what block you're ending -- you have to count braces to follow them back to the starting braces -- a readability nightmare (arguably even with brace matching). So BASIC says, "Skip the curly braces; the method's statement block begins right away, and ends when you end it clearly with End Sub." (Python takes it a step further eliminate End Sub since indentation already conveys block end. But BASIC does not follow this.)

CASE INSENSITIVITY is also an example in my opinion. Humans (before the brain adjustments caused by C) are trained to read natural languages in which "word" and "Word" are the same word; their capitalization is not semantic but simply stylistic (and usually a function of position within the sentence). Furthermore, definitive capitalization when typing is difficult (requiring a key combination). BASIC therefore says "Let's make the compiler understand humans, and not the reverse. If humans consider Dictionary and dictionary to be the same thing, the compiler should too." This is another rule of BASIC.

KEYWORDS -- or the preference for English-like language above special characters -- is also a result of the same rule. Hence BASIC has Or instead of |, Not instead of !, and in modern VB If(a, b, c) instead of a ? b : c). In general BASIC says, "The compiler should speak (to the degree possible) the natural language of humans." (And most definitely humans should not to be forced to speak compiler syntax derived from BNF grammars.)

Conclusion

So this is why the "VB Community" still loves VB -- even after most of the RAD benefits have been done at the CLR/BCL/VS level and are available in C# as well. Today, it's because the language itself -- is one of most readable, expressive, beautiful languages even conceived.

paul1956 commented 6 years ago

@bandleader Thanks you said it perfectly. I can read any VB program and know what was intended no matter who wrote it. With C# I have to translate to VB too try and figure out what some very smart, clever programmer intended. APL was terse and very efficient to write but it was a write once language and impossible to maintain.

ericmutta commented 6 years ago

@bandleader: In general BASIC says, "The compiler should speak (to the degree possible) the natural language of humans."

And let the humans say AMEN TO THAT 😄...I would also add that the VB compiler doesn't just stay close to human language, it also makes an effort to figure out human INTENT. Two examples of this are type inference and intellisense.

===TYPE INFERENCE===

When you type the following VB code:

Dim adder = Function(a As Integer, b As Integer) a + b

...the VB compiler infers that the variable adder is of type Func(Of Integer, Integer, Integer). That's the only thing it could possibly be in any sane universe and the VB compiler just goes ahead and understands what you mean. If you try the same thing in C# however:

 var adder = (int a, int b) => a + b;

...the C# compiler just says NO YOU CAN'T:

image

There might even be a good reason for the C# compiler to reject that code as written, but all I know is that in VB IT JUST WORKS.

===INTELLISENSE===

Given the following VB code:

Public Class Demo
  Private Enum TestEnum
    first
    second
  End Enum

  Private Sub test(value As TestEnum)
  End Sub

  Private Sub caller()
    test(TestEnum.first) '<--- VB intellisense shines here.
  End Sub
End Class

...when calling the test() method from within the caller() method, you expect Intellisense to help you specify one of the enum members defined for TestEnum. VB does it like this:

vs_vb_enum_intellisense

...you get a full list of the enum members with the first member focused so you can auto-complete it just by pressing Tab. However, for C# all you get is this:

vs_csharp_enum_intellisense

...you have to press tab to auto-complete the type name TestEnum, then press dot to open the suggestion list showing the enum members, then press tab again to select the first enum member. Not sure why this is done that way.

===CONCLUSION===

Who is the VB community? Many great answers have been given and I hope to add another variant by way of the above examples: the VB community is those people working on the VB implementation who pay attention to the little things that make everything else JUST WORK.

In fact @KathleenDollard if you can hunt down the person/people responsible for the VB behaviour shown in the above examples, then ask them to explain their design thinking, you'll get a really good answer to this question. Whoever they are, they have great intuition about what makes VB a pleasure to use 👍

PS: none of this is to say that VB is "better" than C#. It is merely to say that VB is different and that those differences offer insights into just who the VB community is in terms of our thought processes 👍

bandleader commented 6 years ago

@ericmutta Very interesting. Your examples (type inference and enum member completion) wouldn't have occurred to me at first, because they aren't to do with the VB language per se -- Roslyn could implement them for C# too. However, I think your point is significant because I think there are lot of those, and even though I am very comfortable with C# syntax, I noticed quite a few of them when I actually starting coding my first project in C#. Here are some more that I remember:

  1. C# has no type inference on class declarations (edit: VB doesn't either, but As New solves much of the problem),
  2. the C# compiler often reports strange errors when the problem is actually a missing semicolon (or similar),
  3. C# Intellisense has trouble finding members when the typed case doesn't match, even if there is no other-cased member.

So yes, I think it's true that language aside too, VB users just more strongly favor a very friendly, consistent, frictionless development experience.

Summary of some of the above points

VB is:

"In many ways, VB simply minimizes the distance between programmer and resulting program."

AdamSpeight2008 commented 6 years ago
  • Modeled after the way humans already read, write and think, So only those that use English?
zspitz commented 6 years ago

@ericmutta

...the VB compiler infers that the variable adder is of type Func(Of Integer, Integer, Integer). That's the only thing it could possibly be in any sane universe and the VB compiler just goes ahead and understands what you mean.

Because the lambda expression could actually be compiled to either of the following:

Dim adder As Func(Of Integer, Integer, Integer) = Function(a, b) a + b
Dim adderExpr As Expression(Of Func(Of Integer, Integer, Integer)) = Function(a, b) a + b

Now, VB.NET defines the first as being the more common / simpler use case, and therefore is the default for an implicitly-typed variable. However, this choice could lead to severe performance issues. Consider the following:

Dim personFilter = Function(x As Person) x.LastName.StartsWith("X")
Dim ctx As New DbContext
Dim qry = ctx.Where(personFilter)

The compiler will resolve the call to Where using Enumerable.Where and not Queryable.Where, simply because personFilter has been defined as a delegate instance. If the query is run against a million-record database with only a single record whose LastName starts with "X", the query evaluation will retrieve all the records in the database into local in-memory objects, and iterate over them in order to find the single record -- no use of indexes, a million-fold cost in network traffic, and high CPU of local processing.

C# avoids this pitfall by requiring you to specify how the lambda expression should be compiled.

zspitz commented 6 years ago

@bandleader @ericmutta

So what does differentiate the VB language (and personality)?

I think it essential to distill the unique features and goals of VB.NET into a single document, as I noted here.

KathleenDollard commented 6 years ago

@bandleader

I agree, particularly with For!!!

Did you do any analysis to get your percentages?

bandleader commented 6 years ago

@KathleenDollard No 😃 Just from years of using VB.

But honestly, how many times in history has a C# programmer written a for loop with any more complex logic than can be expressed in For i =exprToexpr [Step expr]? (And if so, BASIC's Do While/Until ... Loop While/Until would have you just as well covered)

AdamSpeight2008 commented 6 years ago

@bandleader labels, if and goto has all of them covered.

InteXX commented 6 years ago

@KathleenDollard

I am all about community. How do we best do that?

I daresay the fantastic success of the FoxPro community may have been as much owing to the discussion tools we had at our disposal as to the product itself.

I have long lamented the threaded discussion board's passing from popularity.

It was quick and easy to follow and participate in a conversation thread. The current monolithic, single-column format that has gained traction hinders this. Who said what way back when, who replied and what was he replying to? All of this is very easy to track in a multi-paned TreeView format.

This is just my two cents.

KathleenDollard commented 6 years ago

I adored forums. They build communities.

ASP.NET Insiders is a group relatively independent from Microsoft with it's own goals.

VB could create a group with any rules for membership (or none) and any mission (including a safe happy place for questions/community). Microsoft will only need to be involved if Microsoft NDAs are required, but we're OSS now, so I don't know why that would be needed.

My personal belief: That would be fantastic.

InteXX commented 6 years ago

My personal belief: That would be fantastic.

The plate just got a bit fuller :-)

WolvenRA commented 6 years ago

I found this statement in Mads Torgesen's blog of ".Net's Language Strategy" interesting. "An interesting trend we see in Visual Studio is that VB has twice the share of new developers as it does of all developers."

My immediate thoughts were, If VB has TWICE the share of new developers, why would MS want to start treating it like a 2nd class language? And, perhaps more importantly, What is causing these new developers to switch to some other language? I'm guessing that these new developers soon run into the barrage of derogatory comments constantly being spewed by the "Language Religionists" against VB.

I experienced this myself a number of years ago when I was first learning VB.net and it caused me to wonder if maybe I should be using C# instead of VB, even though I much preferred the syntax and style of VB. After a little research I learned that both languages get compiled\translated into the same CIL which then gets compiled\translated into the appropriate executable for the machine it's on. I then found, at least at that time, MS was committed to keeping the languages "equal". Whatever you could do in one, you could (or would) be able to do in the other.

At that point I began to wonder why there were all these C# people making derogatory comments about a language that could do everything theirs did, just as efficiently and with equal performance? That's when I realized it wasn't a "logical" argument, it was a "religious" argument.

It's unfortunate when you hear MS making the same sort of "implied" statements about VB versus C#. I think it's extremely ignorant and short sighted of MS to back away from their promise of keeping VB & C# "equal". With a bit of commitment from MS to educate and debunk the C# "religionists", perhaps those TWICE as many new developers wouldn't get bullied into switching languages.

I suspect it's not any coincidence that since .Net is written in C\C++ and Roslyn is written in C# that there seems to be a bias in MS favoring C# over VB... After all, that's the syntax the MS developers are familiar with.

reduckted commented 6 years ago

@WolvenRA I'm guessing that these new developers soon run into the barrage of derogatory comments constantly being spewed by the "Language Religionists" against VB.

Just take a look at the latest StackOverflow Developer Survey results for the most dreaded language. VB6 (89.9%), VB.NET (80.9%) and VBA (80.0%) all ranked in the top five. Yes, VB.NET ranked higher (more "dreaded") than VBA! At least this year they split them into three languages instead of lumping them all together.

They claim that the percentage is "% of developers who are developing with the language or technology but have not expressed interest in continuing to do so". As someone who likes VB.NET I find these numbers hard to believe (and, of course, you can make statistics look good or bad depending on your want).

I feel like a lot of people hate VB.NET simply because it's VB.NET, or maybe because it has roots in BASIC, and therefore must be bad. Similar to how everyone used to hate Microsoft because they were Microsoft (and maybe some people still do).

WolvenRA commented 6 years ago

@reduckted Yeah, I find those numbers less than believable as well. They can get the results they want by how they ask the questions or who they ask.

If you were to actually believe those numbers, you'd have to assume that the vast majority of all VB.net programmers are using VB against their will. I don't think so. It's more likely that 80% of all C like language programmers voted VB as "Most Dreaded".

rskar-git commented 6 years ago

@WolvenRA @reduckted In terms of why VB gets "the dread", I think you're both right.

I think what happened was Java, Javascript and PHP (all appearing c. 1995). C was (and still is) a brilliant language (despite its warts and quirks), and C++ was a necessary next step (very powerful, but with syntactic contortions). The point I'm after here is that Java/Javascript/PHP were intentionally designed to be syntactically similar to C (and most of its idioms) so that they could be quickly and easily learned by anyone who already knew their way around C or C++. This is likely because C and C++ were prominently a part of Computer Science education (at the university level) since the late 1980's (displacing FORTRAN and Pascal). Eventually, Java (mostly) displaced C as the pedagogic choice of introductory language (e.g. https://www.joelonsoftware.com/2005/12/29/the-perils-of-javaschools-2/). (Python became a common alternative to Java for introductory courses soon after version 2.0 was released in 2004; e.g. https://www.tiobe.com/tiobe-index/python/)

Anyway, we are now a long-time away from the home-computer revolution of the mid-1970's thru early-1990's (e.g. https://cs.stanford.edu/people/eroberts/CSCapacity.pdf). A generation (or two?) of kids got plenty inspired to get into computer science, probably because those early (8-bit and 16-bit) machines were hardly the fairly complete (32-bit) appliances they became by the mid-1990's. What kid with a computer back then wouldn't try out BASIC programming, and then maybe (at least dabble at) 6502 or Z80 assembly? Apparenly there was such a hugh swell of interested students that universities couldn't attract enough faculty to meet the growing student demand for comp sci!

So, could it have been during the Computer Science degree downturn of the mid-1980's that brought on the snobbery? It seems that admittance to CS programs became extremely restrictive at that time (due to lack of faculty), and many students got turned away. Meanwhile, the demand for IT workers grew quickly; up 74% from 1970 to 1980 (https://www.census.gov/content/dam/Census/library/publications/2016/acs/acs-35.pdf); up 92% from 1980 to 1990; and up 127% from 1990 to 2000. I haven't crunched the numbers, but I am going to guess that for much of the 1980's and 1990's, most of the programmers hired didn't hold CS degrees - out of necessity on the part of employers. I'd bet if you were a tween with a computer during the home-computer revolution, you could then be an employable self-taught programmer in the 1980s and 1990s.

That of course would be the context in which BASIC (in its wide range of flavors), and eventually Visual Basic (c. 1991), became a thing in business, manufacturing, and scientific computing. It would be this period of history when a bunch of non-CS people who played with "toy" computers as kids got into a career of software development.

By the 2000's, a kid with a computer had a very capable machine with games, word-processing (WordPad and Notepad) and Internet browsing built-in. A built-in programming language, on the other hand, not so much. (Starting with Windows 2000, Microsoft no longer included QBasic with their operating systems.) Maybe Javascript with the browser, if you thought of it somehow, or somebody showed you. Otherwise, computer programming as an interest was easily crowded out by other interests (games, music, movies, social media...). The times have changed. For most folks with computers now, computer programming might start at the high-school or college level. And when it starts, it would likely be with Java; and therefore C-ish syntax and idioms will be the standard by which other languages will get judged - because human beings tend to judge the different in terms of the familiar.

Given this reality, isn't it remarkable that VB has this much staying power, still managing to be in the top 10 or top 20 of language "popularity"? I wonder if VB of .NET gets noticed because VBA and VB6 perennially get rediscovered by new programmers?

WolvenRA commented 6 years ago

@ rskar-git Good points. The fact that they learned C-ish like syntax in school would, just as you said, bias them to that syntax style. But as multiple commenters on Mads Torgesen's blog post pointed out, although they had been C# programmers they found they liked the cleaner, easier to read syntax of VB and were in fact more productive with VB than C#.

It will be interesting to see what happens as more schools start using Python for their beginning programming courses. Of course, if they had any sense (or if they could trust MS to not suddenly change their mind and start charging for it) they would use VS Express and VB for their computer programming classes.

One more thought... How many people does MS employee? What is MS current profit percentage? Don't tell me they need to "save costs" by limiting the manpower or investment in VB. That's BS...

ocdtrekkie commented 6 years ago

So this conversation, about people's "favorite" language came up yesterday on HN: https://news.ycombinator.com/item?id=16598098

I expected to get downvoted for saying VB. (https://news.ycombinator.com/item?id=16598117) I didn't, and one comment highlighted specifically that VB has a good IDE. :) As an interesting note, people seemed to talk about their favorites being simple languages, as opposed to "the most capable". Python got mentioned highly here, and one of them stuck out to me, particularly a preference for keywords over symbols, which is a highlight for VB as well: https://news.ycombinator.com/item?id=16598224

ocdtrekkie commented 6 years ago

@WolvenRA Google stashes like a quarter trillion dollars on a Caribbean island. It's not about "needing" to save money, but companies goals are to make profits, so they're going to cut anything that they don't see returns from, irrespective of how much money they are currently bathing in. ;)

WolvenRA commented 6 years ago

@ocdtrekkie When you have 100's of thousand of developers creating Millions of lines of code for thousands (100's of thousands?) of customers running MS Windows applications, it's hard to imagine anyone at MS could be dense enough to not see "any return". The real problem is, MS has become the giant bureaucracy that IBM was (and still is) that believes they know whats best for everyone... That's exactly how IBM lost their virtual monopoly on the computer industry.

reduckted commented 6 years ago

Here's another example of VB.NET being left out of the .NET conversation.

Many folks have figured out that C#/F#/.NET is cross-platform...

No mention of VB.NET. 😞