Announcements
OpenSilver 2.0 adds VB.NET support—this is AWESOME! Please go show some love to those who support our community ❤️
@DualBrain has set up a VB Discord server for all dialects of VB, Classic and .NET—Join Today!
Hey all,
It’s November already. I’m still plugging away at the ModVB Language/Runtime/Compiler backlog reveal. I’m currently working on the section on “Null and Nothing”. This was the last section to be added explicitly and is the least or second least developed. After this I just need to pump out a few pages on performance and interoperability and I think I’m on track to drop the massive collection of posts this month.
In the meantime, a community member over on the VB Discord server asked for a quick reminder of the highlights of what’s planned for ModVB. I paired down my documents to something … highlight-y and I thought others would benefit from the summary. The exact order of sections is subject to change but the spirit and highlights of each are below.
Remember, ModVB is not one feature or a few features but a focal point for the continued evolution of the VB.NET language, based on the Roslyn codebase. With regard to actual capabilities/features/fixes, there are currently over 100 distinct work items on the backlog in the language, compiler, and runtime library, broadly organized into a dozen or so buckets (subject to change). Please understand these highlights are nothing approaching exhaustive.
UI, XML, and XAML
Enhancing VB’s existing XML capabilities for modern front-end development targeting the web and mobile.
Highlight:
- XAML literals
- + at least 5 more!
JSON
Replicating VB’s amazing XML story with the JSON data format.
Highlight:
- JSON literals and JSON pattern matching.
- + at least 4 more!
Smart Casting and Pattern Matching
Features for testing types and shapes of data and inspecting complex data structures.
Highlights:
- Checking a local variable/parameter with
TypeOfwill cause its type to change where the compiler can infer it is safe. - The top-requested VB feature:
Select Case TypeOf - General pattern matching against types, tuples, wildcards, strings, and other user-defined named patterns.
Streamlining and Boilerplate Reduction
Does what it says on the tin.
Highlights:
KeyFields & Properties, and Auto-Constructors- Top-Level Code
- Type-Inference improvements
- + at least 10 more!
General Modernization and Evolution
Revisiting almost every statement in the language and a few other constructs to improve them in some way, long requested features, consistency fixes, etc.
Highlights:
- Tuple deconstruction in several places in the language such as local variables,
For Eachloops, queries, etc. Select Caseon object identity.- “Closed”, Generic, and Nestable
Moduledeclarations. - + at least 15 more!
Declarative Programming and Code Generation
Features which make it easier to reuse functionality across repetitive tasks both with and without source generators.
Highlight:
- Source Generator support features
- + at least 2 more
Asynchronous Programming Enhancements
Deeper integration of asynchrony with the language.
Highlights:
Await EachblocksAsync IteratorFunctions- + at least 4 more!
LINQ Enhancements
Revisiting LINQ after 15 years with new features and fixes to make working with data even more productive.
Highlights:
- Queries in
For Each(andAwait Each) blocks. - New operators
- + at least 7 more!
Dynamic Programming Enhancements
Revisiting VB late-binding to make it work better and work in more places.
- At least 11 topics!
Interfaces, Inheritance, Extensions, & Delegates
Making OO fundamentals more productive.
Highlight:
- Implicit Interface Implementations
- + at least 6 more!
Null and Nothing
Making working with the reality of nulls in code safer, more elegant, and more consistent.
Highlight:
- Nullable reference types
- + at least 3 more!
Performance and Interoperability
Improvements to let VB developers write faster code for performance-critical components as well as interoperating with modern features of the .NET platform.
Highlight:
ByRefStructure story- + at least 4 more!
Versioning
Better features for dealing with or initiating change between library versions.
Runtime Library Enhancements
Revisiting the VB runtime library so that it’s more portable, more performant, and more useful.
Highlights:
- Runtime helper optimization
Mynamespace modernization- + more.
Summary
If you were keeping count that’s over 100 separate topics! After I finish writing I’ll move things around some to make things flow better and I’m trying to combine certain very similar topics where it makes sense and each topic may be anywhere from half a page to 10 pages for the largest topics so it’s not an exact page count but as promised, this “post” will be massive. My next update should be that the artifact is “text complete”. See you back here soon-ish.
Regards,
-ADG
Special Thanks to ANYONE who is donating or has ever donated to me via Patreon! I could not pursue my dream of producing modern VB features and content without their support.
Dr. Donna M., Alex T., Kirill O., Neal G., Govert D., Dr. Anne J., Taiwo A., Jonathon M., Peter B., Kevin R., and Paul C.
Looking forward to this!
LikeLike
I have contributed to WinForms VB runtime with improvements to Networking and Async but I have touched every file in 2 PR’s currently in review. Hopefully it’s not a duplicate or conflicting with your work.
LikeLike
That sounds great! Link to the PRs?
LikeLike
https://github.com/dotnet/winforms/issues/10117
https://github.com/dotnet/winforms/issues/9867
LikeLike
I have a question about the “Streamlining and Boilerplate Reduction” section. Is async Main listed and folded here?
I’m recently fixing VB interactive to overcome the deprecation of VBScript. When I try to use the top-level Await statement in *.vbx script files, the VB compiler of Roslyn 4.7.0 throws error BC36937. The error ID is the same as using Await in Sub Main. So, I guess that the top-level code feature depends on async Main.
Top-level code may also depends on the async iterator function feature. Because in interactive mode of vbi.exe, the combined use of “?” and “await” (for example, `? await task.run(function()1)`) executes the current submission synchronously (similar to GetAwaiter.GetResult). This behavior will cause deadlock when the REPL is running in a thread that has synchronization context. To fix the deadlock, submissions can’t be described as a normal iterator function. Async iteration function should be used instead.
LikeLike
Hey, thanks for reaching out. I just checked and Async Main is in fact in that section (rather than the Async section). Regarding top-level code, my intent is that the contextual keyword `Await` should be reserved there as many scenarios as you point out depend on it. I’m less confident in the scenarios for `Yield` but it could probably stand similar treatment.
LikeLike