Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Cory Smith
    @DualBrain

    It's interesting that some of the first comments I've seen regarding this blog post are negative. I'd like to respond to a couple of these:

    "There's no change to VB.NET."

    I think it is important to note and bears repeating... VB has always been more than "just the language". The overall experience the has always been what makes VB, well, VB. Remember, "Edit-and-Continue" was a feature intrinsic to the VB experience and was "lost" in the move from VB6 (COM) to VB7 (.NET Framework). It eventually made it's return to VB in 2005. VB is available on .NET 5 and it continues to be available (supported) in .NET 6. It is part of Roslyn; Roslyn is the foundation of C#, VB and Visual Studio.

    I also want to point out that there were indeed language changes to VB... it's just that these changes resulted in no visible difference. And, yes, this is mentioned in the blog post from @KathleenDollard (that @paul1956 pointed to). This isn't the first time that this sort of change has taken place... just because that language hasn't changed doesn't mean that it's not changing and evolving.

    "These are just changes in the IDE."

    There are also significant changes to WinForms on .NET that have taken place to fully embrace/support VB; meaning that the experience we have as VB developers (and only as VB developers) has made the leap to the new .NET platform. There are also other improvements to this specific API that are being considered; so there are changes beyond "just the IDE". Additionally, the investment in this area is significant and only affects VB... let that sink in.

    "Do any of the .NET improvements apply to VB?"

    This question was posed in the Q&A and the panel was clearly prepped regarding the improvements mentioned in the blog post liked above by @paul1956. This leads me to a very common comment I encounter that goes something like "Microsoft continues to not invest in VB." This comment is simply ignorant. The amount of time, money, design, etc. that went into designing Roslyn continues to produce results for VB - there is, however, an issue regarding communication and I've already pointed out that there have been some improvements to including mentioning (where appropriate) that a feature is available for VB (as well as C#). But if these types of blog posts are met with negativity, why would anyone want to continue to expose themselves to the "nothing is ever good enough" crowd?

    Paul M Cohen
    @paul1956
    On a more positive note 17.1 Preview 2 will include the improved formatting for VB with Line Continuations Comments something I use a lot in Conversions and the resulting code is much easier to read. Also the changes in VB startup experience in WinForms will have a huge impact in moving code from Framework to .Net and having a more consistent look with a lot less effort. Support was added to WinForms to allow editing of the content within strips and panels from the UI and I have already found it extremely useful.
    Cory Smith
    @DualBrain
    ๐Ÿ‘๐Ÿ‘๐Ÿ‘
    Cristian FRC
    @cristianlt23

    @DualBrain Since you have a fantastic knowledge of VB.NET, how about preparing a text in the comments What's new in Visual Basic in Visual Studio 2022 to inhibit the negative comments that start to appear?

    We need to empower the news and prevent negative comments from appearing and proliferating.

    In fact, I think each of us should write a positive and supportive review for VB.NET

    Paul M Cohen
    @paul1956
    I think the article by @KathleenDollard did an excellent job plus the whatโ€™s new in WinForms for VB.
    Cristian FRC
    @cristianlt23
    @paul1956 It's a really great job, I thought it would be nice if the article also had supporting comments to show that we are aware of the changes and that we recognize the effort to improve VB.
    Cory Smith
    @DualBrain
    @cristianlt23 I've replied to the comment regarding "nothing new in VB per se".
    Cory Smith
    @DualBrain

    Wanted to take a moment to share an interaction I had on Twitter regarding the negativity around not only VB, but .NET in general.

    David: I don't know about you, but the way I keep in touch and find out about the latest drama in the .NET/Microsoft world is by seeing the usual suspects trying to fan the flames, and stir it up. Very successful strategy.
    t_ham: Bad things happen when good people do nothing.
    Me: So what is the excuse for the hate directed at "that other .NET language"... Where are all these "good people" you speak of regarding the last 20 years of (what amounts to) bulling that have all but silenced the voice of a significant portion of the .NET population.
    t_ham: I don't know what you mean by "that other .NET language". Are you talking about VB? It definitely sucks that MS has been migrating away from that, especially if it's a majority of your skillset. What are you on about bullying, though?
    Me: "It definitely sucks that MS has been migrating away from that"... Answered your own question about the bullying and aren't even aware. Behavior by the community has been so constant that your statement is seen as an "obvious fact". The evidence, however, is to the contrary.

    Microsoft isn't the one migrating away from VB. This isn't and continues to not be the case. The investment by Microsoft with the foundation of Roslyn is pretty telling and the continued investments are visible (Source Generators, WinForms, etc.) if anyone takes a moment to look. But this guys comment speaks volumes as he doesn't even realize that he's repeating the comments that those that seek to silence others (aka bullying) not even realizing that he's repeating garbage. The comments by bullies has been so constant as these statements have become "factual"; no one even considers it bullying behavior at this point. It is so pervasive that many VB believe it. It's Dark Psychology at it's finest.

    This is why it is so important that we work together to try to undo this type of thinking; no only externally but equally internally. Let's get out there and do awesome things with VB and share with others that we aren't limited by any sort of "perceived" limitations; we, as a community, can accomplish anything we want in our language.

    The reality, thanks to things like .NET Standard, is that we aren't really limited. Yes, we might have to write a small amount of HTML, CSS, Javascript, XML, JSON and even a bit of C# to accomplish what we want to do where we are primarily working in VB.

    Over to .NET Conf Live... VB.NET is mentioned on the slides for upgrading to .NET 6. ๐Ÿ˜Ž
    Cory Smith
    @DualBrain
    I've had the .NET Conf Live stuff running to the side of me while I'm working throughout the day and whenever the term Visual Basic is mentioned I have to stop what I'm doing and pay attention to what is going on... you know like a dog and "SQUIRREL!!!!!"
    Cory Smith
    @DualBrain
    Wholly S**T!!!! I just heard that Razor is now fully switched to utilize a C# Source Generator... it might be time to take another look at Razor pages. (Watching .NET Conf Live)
    Cory Smith
    @DualBrain
    So I'm seeing a Microsoft.NET.Sdk.Razor.SourceGenerators entry under the Analyzers node; but expanding it displays "This generator is not generating files." I would have expected to see how the generator was generating the code from the .cshtml files in here or am I way off base on this? There are several .cshtml files in a default C# project, so now I'm confused.
    CyrusNajmabadi
    @CyrusNajmabadi
    please file issue over at dotnet/roslyn. someone on the SG or Razor side will be able to clarify (or identify a bug if one is there).
    Cristian FRC
    @cristianlt23

    I've replied to the comment regarding "nothing new in VB per se

    @DualBrain
    You are my hero.๐Ÿ†๐Ÿ†๐Ÿ†
    and congratulations for the text, it was fantastic๐Ÿ‘๐Ÿ‘๐Ÿ‘

    Cory Smith
    @DualBrain
    @CyrusNajmabadi I'd already posted the question over at dotnet/aspnetcore#38238 and the answer I received does tell me how to get to the generated files; but I'm left a bit confused as now I'm wondering is there a way to "hide" (by default) the generated source when building source generators within VS? I thought C# and/or VB Source Generators simply generated code in a way that it shows up under the Analyzers section... but, assuming that the razor source generators are indeed using Source Generators, they have some sort of a bug that prevents them from showing up in the Analyzers section in the Solution Explorer. To access the code, they are telling me to add the <EmitCompilerGeneratedFiles>true</> flag in the project file. This does indeed provide access to the generated files in the /obj/ folder... but something just seems to strike me as off. Is the current version truly built using Source Generators or still some "hybrid" style that I'm not familiar with or is the some sort of bug with Source Generators that I could encounter when I build my own (that I have as yet encountered with how I've currently done things... if so, how did I manage that?). Not expecting you to dig deep on this... just asking to see if you are aware of anything "weird" regarding Source Generators that could possibly present as it is. I'm guessing, at this point, that the ASP.NET Core source generation isn't 100% the "Source Generators" (as I'm currently familiar) style. I haven't gone down the rabbit hole to verify/or not the situation in ASP.NET Razor; began this process simply because the comment was made in the event - and it always possible that the comment was made in error/misinformed.
    (Also, the response stated that but bug couldn't be addressed until 7.0.)
    Cory Smith
    @DualBrain
    Sounds like it is a case of some sort of work around due to "legacy design limitations around how it supports it's tooling"; however, Logging or System.Text.Json do work as expected. Good to know... what peaks my interest most about this is that I initially expected that existing generators would be left as is and Source Generators would be utilized going forward (unless of course there was a compelling reason to "rewrite" outweighing the risks). Seeing this raises my hopes that Source Generators are indeed being adopted at a faster rate (and retroactively in some cases)... having this common infrastructure for how to create these generators is a good thing for VB. I haven't dug into these generators as yet, but if they are doing one approach over another... it may even be better for us. What is this approach, one may ask? There is the "cheap and easy" (initially) way which is to just do a lot of text concat to produce the resulting code... or there is the (more) proper approach with is to build the code using Roslyn. If it is the later, then the tree should be a lot easier to generate C# and/or VB. I know that there is a push by some within MS to encourage the Roslyn approach... so if this happens we may be in a position where it would take a lot less effort to support VB... it still may require that we have community champions to do the work... but the work should (in theory) be a lot more manageable. (This is my hope... we'll see if it becomes reality.)
    CyrusNajmabadi
    @CyrusNajmabadi
    I genuinely don't know :-)
    People at dotnet/Roslyn on GitHub might though.
    Cory Smith
    @DualBrain

    The https://devblogs.microsoft.com/dotnet/whats-new-for-visual-basic-in-visual-studio-2022/ announcement has been updated slightly due to a premature announcement...

    A previous version included the โ€œInline diagnosticsโ€ feature here in error. This feature is part of the 17.1 (Visual Studio 2022 Update 1) preview, not 17.0 (Visual Studio 2022).

    I can confirm that it is in the Preview...

    Cristian FRC
    @cristianlt23

    @DualBrain

    Let's go out and do amazing things with VB and share with others that we're not limited by any kind of "perceived" limitations; we as a community can do whatever we want in our language.

    We really need to find an awesome case for VB, however most of the lovely apps are on the web and with VB I think we can get to MVC 5 and the ASP.NET Core web API if I'm not mistaken.

    The deciding factor for VB is definitely MAUI, this tool can really help change the popularity of VB, but I don't know if MS has plans for VB in MAUI

    Cristian FRC
    @cristianlt23
    https://www.youtube.com/watch?v=8dNiXLkcTNs
    โžก๏ธ04:00 time
    I will promote this video in VB groups
    Cory Smith
    @DualBrain

    Where there is a will... there is a way. ๐Ÿ˜Ž Thanks to VB Source Generators I'm working on what I'm currently naming "Project Insanity". Tonight I worked through a VERY, VERY, VERY ROUGH proof of concept and do think that what I want to do will be possible. It's still a long road from here to there, but if I can do it... it will be FREAKIN' AWESOME!!!! (I'm being a little ambiguous at this point as I don't want to get peoples hopes too high... but if I can make it work... I'm thinking it's pretty jaw-dropping if I may say so myself - and what a way to try to set myself up for disappointment ๐Ÿ˜œ).

    I've said this before, but I believe it bears repeating... Source Generators (along with some other language features along the way) are really opening the door to some very interesting concepts/ideas/possibilities. Of course this now mean that I have to really put in the time to learn the whole of the ins-and-outs of Roslyn. ๐Ÿค”

    Cristian FRC
    @cristianlt23
    are we about to see a revolution ???? ๐Ÿคฉ
    I like this great information created by geniuses ๐Ÿ˜„
    looking forward to the next episode of @DualBrain ๐Ÿ˜Ž
    Cristian FRC
    @cristianlt23
    Guys, I want to ask a question.
    Is all the support F# is getting in .net5 and .net6 a MS decision or an F# community effort?
    Cory Smith
    @DualBrain

    As an outside observer to the F# community, I can only speculate. The first point to keep in mind is that F# isn't a "Microsoft thing" but rather something that Microsoft participates within. Officially, it is controlled by the F# Software Foundation (FSSF) (almost 7 years ago) which is a non-profit entity. Microsoft and many other contributors help with the momentum and Microsoft is the primary team behind the Visual Studio integration (to the best of my knowledge). From what I understand, Microsoft has a big interest (and invest heavily to) F# primarily because of Universities and scientific-related teams - of which these organizations typically spend a significant amount of money with Microsoft (again, could be a little off on this). With that said, F# (to me) is a very important part of the .NET eco-system and one that we should not only appreciate it's existence to help ensure CLR/CLS/.NET Standard/etc. but also take a bit of inspiration from regarding what community could do. So to sum up...

    Is all the support F# is getting in .net5 and .net6 a MS decision or an F# community effort?

    From what I understand, it's "mostly community effort".

    Cory Smith
    @DualBrain
    Has anyone seen any sort of materials that clearly show "Minimal APIs" versus writing the same code assuming "Minimal APIs" doesn't exist - a contrast/compare between the two?
    Cory Smith
    @DualBrain
    In this episode of *VB Supported"... check out https://gist.cafe/#project/vb
    Cory Smith
    @DualBrain

    WinForms and WPF devs, help us decide if we should build a new feature for .NET desktop platforms and what should be our priorities in the future. Schedule a call with me via https://aka.ms/dotnetdesktopcall. Your feedback is super valuable! Folded hands

    This was posted on Twitter... just had my call (I was apparently the very first to sign up) with them and I encourage others to do the same.

    Paul M Cohen
    @paul1956
    Not on twitter but if you covered dark mode and high DPMI, I am good. About to board a ship for a few weeks so a call is probably not going to happen.
    Cory Smith
    @DualBrain
    I did, but I think it would be a good idea to get multiple people to provide the one-on-one feedback; I'm one lone voice... the more of us that voice this the better. With that out of the way, I did share the CSharpToVB project as an example of "how hard it is to try to 'hack' together dark mode in WinForms" so they could see it in person.
    Cristian FRC
    @cristianlt23
    @DualBrain thanks for answering the question I asked regarding the F# community, according to your answer they have done a great job
    Cristian FRC
    @cristianlt23
    I would like to know why this .Net Blog post was removed from the date string.
    https://devblogs.microsoft.com/dotnet/whats-new-for-visual-basic-in-visual-studio-2022/
    Cristian FRC
    @cristianlt23
    all posts from November 8, 2021 are still there, except the VB article
    Cristian FRC
    @cristianlt23
    I did a little research with students from the software engineering course at the university in my city.
    I asked:
    1) what prevents you from using VB.NET?
    the main answer was:
    1) Lack of clear and objective documentation with examples and scenarios where VB can act (work)
    2) found the VB documentation on the MS website insufficient for web development
    Could we as a community do something in any way?
    Cory Smith
    @DualBrain

    I would like to know why this .Net Blog post was removed from the date string.

    I guess I'm confused as I see the article; is there something I'm missing?

    Could we as a community do something in any way?

    There's not an easy answer to this; with that said I'm working on writing a blog post regarding a particular angle related to this subject... when I get it finished I'll update here with a link. I have a very rough first draft and want to spend some time expanding on it as I want to back up what I'm saying with additional facts that can be referenced.

    Cristian FRC
    @cristianlt23

    @DualBrain

    I guess I'm confused as I see the article; is there something I'm missing?

    if you go to: https://devblogs.microsoft.com/dotnet/
    and start browsing the blog, you'll notice there's no news about VB unless you use the magnifying glass to search and type "VB"

    However, this news
    https://devblogs.microsoft.com/dotnet/whats-new-for-visual-basic-in-visual-studio-2022/

    was visible on the blog and now doesn't come with all the other news anymore.

    I joined the blog on November 8, 2021 and saw the news about Kathleen's VB, now if you don't look in the magnifying glass you won't find it on the blog.

    I found it strange that this happened

    Cristian FRC
    @cristianlt23
    Today I answered the Jetbrains survey and it is clear that VB.NET was the most used language in my daily life
    https://surveys.jetbrains.com/s3/Ssrvey-panel-validation
    Cory Smith
    @DualBrain

    Looks like there might be something taking place regarding language change...

    The feature is called CallerArgumentExpression with the C# spec found at https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/caller-argument-expression

    The VB specific activity can be found at dotnet/roslyn#54132

    There's also a conversation taking place regarding setting the default language version to be the same as the latest; or at the very least setting the "default" language version in VS2022 to be 16.9. I very much agree on both accounts... dotnet/roslyn#57093
    Cory Smith
    @DualBrain

    The TLDR of this is that Visual Studio 2022 v17.1 should see VB "16.9" being the default language version (it is currently "16.0").

    For anyone interested about the process of getting changes done around "language changes" that will impact developers; take a moment to review:

    dotnet/roslyn#57688

    Keep in mind that this a conversation among members of the Roslyn team about a change requested (initiated) by a manager. Don't get me wrong, I'm happy to see this type of thing taking place... just because some people think that it is a "small change" that most likely won't affect anyone, the policies are in place to help ensure/guarantee that things are looked at. When outsiders encounter this level of "push-back", there are complaints that the team is resisting change... but I don't see this as being the case. If you want to contribute something, you have to do so following the same level required by the team members. I just find the chain of events and conversation in this pull request enlightening and take some solace in the idea that we really do have people on the team doing their best to ensure we continue to have a high quality product that requires a consistent high-bar with regard to changes being made.

    Cory Smith
    @DualBrain
    What if it were possible to do the following in VB?
    10 PRINT "HELLO WORLD!"

    Right now, to do the same thing:

    Imports System
    
    Module Program
      Sub Main(args As String())
         Console.WriteLine("HELLO WORLD!")
      End Sub
    End Module

    or more accurately...

    Imports System
    
    Module Program
      Sub Main(args As String())
    10:
         Console.WriteLine("HELLO WORLD!")
      End Sub
    End Module
    With the concept of Top-Level Code, the theory would be that it would look something like:
    Imports System
    
    10:
      Console.WriteLine("HELLO WORLD!")
    Cory Smith
    @DualBrain

    The reason why I include line numbers in the first example is to think about the following example:

    10 PRINT "HELLO WORLD!"
    20 X = X + 1
    30 IF X > 10 THEN GOTO 50
    40 GOTO 10
    50 END

    which would (theoretically, if Top-Level Code existed in VB) to:

    Imports System
    
    Dim x As Integer
    
    10:
      Console.WriteLine("HELLO WORLD!")
      x=x+1
      If x > 10 Then GoTo 50
      GoTo 10
    
    50:
      End

    or, depending on if you had certain Project options set appropriately...

    10:
      Console.WriteLine("HELLO WORLD!")
      x=x+1
      If x > 10 Then GoTo 50
      GoTo 10
    
    50:
      End

    For a really insane option, what about the following?

    ? "HELLO WORLD!"

    What if, indeed...

    Cory Smith
    @DualBrain

    AND... what if... and I do ask this in all seriousness... this were possible WITHOUT changing the VB compiler? It might just indeed be possible to support this with the tools that currently exist where (once available) all you would have to do is simply add a nuget reference.

    Which then leads me to ask what would PRINT (or ?) do for different project types? In a Console application it would output text to the, well, Console. In a WinForms application, would it be equivalent to a Debug.Print or for "logging"? In an ASP.NET type application, would it be for sending content to the browser (HTML)?

    DISCLAIMER: This may be something that requires a team of people to participate in (ultimately) to accomplish.

    Paul M Cohen
    @paul1956
    It would be fantastic count me in