Draft: The initial ModVB backlog outline

Like 2 years ago I said “I’ve got like 11 pages of just bullet points of stuff to do for the ModVB and I tried to publish more polished detailed writeups of each to help folks see the vision but that was going to be like 300 pages so then I trimmed it down to somewhere in between and I still will need to unzip all of these in professional detail on github. But for now I just want this out there and not hanging over me every day. This is copy-pasted section 3 direct out of a Word doc I started with. I’d like to post a follow-up which maybe illustrates each bullet point briefly since not everyone will be self-evident. These are old and minimally processed–I cut out most of the prose and code samples and the section on tooling/IDE-focused changes. Chrome says that gets me down to The point is simply to at a glance answer the question of “What would Anthony even add to VB? Surely it’s like 3 things and they’re all just copies of what C# already has” or to illustrate that I have a rather long-term vision. When I tried to summarize this agenda 2 summers ago I believe I got through Sections 2.1 and 5. I’ve demoed bits of other sections at various times in either prototype or pre-release form. This outline is slightly older than what I promised in that blog post because I refactored some sections and some scenarios/features that folks highlighted in response to those posts have been incorporated but I’m trying to put this out without updating it to be perfect or even great. Chrome says this is about 7 pages printed.

Cheers,

-ADG

1        General Modernization and Evolution I

1.1     Local Declaration Enhancements

1.1.1    A new keyword for introducing local variable declarations: `Let`

1.1.2    Tuple deconstruction syntax

1.1.3    Bug-fix/Consistency

1.2     Assignment Enhancement

1.2.1     Unassignment?

1.3     `Select Case` Enhancements

1.3.1    `Select Case` on Type (Smart-Casting)

1.3.2    `Select Case` on Shape (Pattern Matching)

1.3.3    `Select Case` on Identity (using `Is`/`IsNot` operators)

1.3.4    `Select Case` using `Like` operator

1.3.5    `Select Case` using (new) `In`/`NotIn` operators

1.4     `For` Enhancements

1.5     `For Each` Enhancements

1.5.1    Tuple deconstruction

1.5.2    Query clauses

1.5.3    `IAsyncEnumerable` support

1.6     `Do` Enhancements

1.7     `With` Enhancements

1.7.1    Named `With` variable

1.7.2    `.Me` pseudo-member

1.8     `Try` Enhancements

1.8.1    `Await` in `Catch` and `Finally`

1.8.2    Scope?

1.8.3    Fault blocks?

1.8.4    Implicit

1.8.5    `Retry`/`Resume Next`?

1.9     `Using` Enhancements

1.9.1    `Catch` and `Finally` Blocks

1.9.2    Asynchrony?

1.9.3    Tuple Decomposition

1.10     `SyncLock` Enhancements

1.10.1                       `Catch` and `Finally` Blocks

2        Smart-Casting and Pattern Matching

2.1     Smart-Casting

  • Intersection types
  • In LINQ
  • Visitor optimization
  • Nullable
  • `Assert` statement?

2.2     Pattern Matching – General

  • In LINQ
  • Implicit and explicit ShapeOf methods

2.3     Pattern Matching – Interpolated Strings

2.4     Pattern Matching – JSON

2.5     Pattern Matching – XML/XAML?

2.6        Summary/Final Thoughts

3        JSON

3.1     JSON Object and Array Literals

  • Builder pattern
  • Target-typing to JSON types
  • Target-typing to non-JSON types

3.2     JSON Schema Types

3.3     “Fluent” Postfix Parenthetical Casting

3.4     “Fluent” Postfix Null Coalescing

4        UI, XML, and XAML

4.1     Overview

4.2     XAML Literals

4.3     Embedded Block Expressions

4.4     Wildcard Lambda Expressions

4.5     Expression Tree Enhancements

4.6     Expression Tree Alternatives

4.7     XML Schema Types

5        Streamlining and Boilerplate Reduction

5.1     Top-Level Member Declarations, Statements, and Expressions

  • Implicitly-declared types and members
  • Filename patterns

5.2     Key Fields & Properties, and Auto-Constructors

5.3     Async Main

5.4     Type-Inference Enhancements

  • Static local type inference
  • Nearest common ancestor in dominant type (ternary, collection initializer, type arg inference?)
  • Overloading on constraints?
  • Target-typed conversion operators?

5.5     Lightweight Doc Comment Syntax

5.6     Implicit Conversions from String Expressions

5.7     Implicit Comparison Operators

5.8     #Ignore Statement

5.9     Implicitly-Escaped Keywords in Declarations?

5.10     Bit Indexer

5.11     String comparison extensions?

5.12     Explicit Anonymous Delegate Type “Names”

5.13     Miscellaneous

  • Optional parameter default value inference
  • Type inference for accessor `value` parameters
  • Optional parentheses for `NameOf` expressions
  • `?` Statements
  • `Custom` Event keyword
  • Folder-level Imports and Root Namespaces
  • &= StringBuilder

6        Declarative Programming and Code Generation

6.1     Smart-Attributes

6.2     Semantic Pre-processing

6.3     Replaceable Declarations

7        Language Integrated Query Enhancements

7.1     For Each Integration

7.2     Range Expressions

7.3     Tuple-Deconstruction

7.4     Aggregate Functions in Select

7.5     New Query Operators

  • Take Last
  • Skip Last
  • Intersect?
  • Except?
  • Union?
  • Zip?

7.6     Asynchrony and Parallelism(?)

7.7     Collection Initializer Enhancements

  • Nested Member and Collection Initializers
  • Combine With and From
  • Implicit New

7.8     Query Collection Initializers

7.9     `In` and `NotIn` Operators

  • IsIn/IsNotIn?

7.10     Target-Typing

8        Dynamic Programming Enhancements

8.1     LateBound/Dynamic Pseudotype

8.2     Alternate Dynamic Types?

8.3     Dynamic Interfaces?

8.4     Annotated Types

8.5     Default Methods

  • Late-Bound

8.6     Late-Bound AddressOf

8.7     Late-Bound AddHandler

  • Handles?

8.8     Late-Bound Queries?

8.9     Late-Bound User-Defined Conversions?

8.10     Unify Early- and Late-Binders

8.11     ParamArray with Named, Omitted, ByRef/Out parameters, etc.

9        Asynchronous Programming Enhancements

9.1     Lightweight Async Syntax

  • Async Sub As Task
  • Async Function As T
  • Implicit suffix
  • Conversion rules/Async expressions
  • Lookup rules?
  • Elision of intermediate Await operators
  • ?. Propagation

9.2     Async for non-Task Types (e.g. ValueTask)

9.3     Agile Async Methods

9.4     Await Each Blocks

9.5     Async Iterator Methods

9.6     Async Events

  • Function Delegate Return Types

10 Null and Nothing

10.1     Nullable Reference Types

10.2     Null literal?

10.3    Null-safe statements (For Each, Await, AddHandler/RemoveHandler, Assignment)

10.4     This feature intentionally left blank

11 General Modernization and Evolution II

11.1     `Out` Parameters & Arguments

11.2     Module Enhancements

  • Closed by default
  • Generic
  • Nestable

11.3     Method-Level `Imports` (and `Option`?) Statements

11.4     Enum Enhancements

  • Flags?
  • Non-Integral?
  • Conversions from String

11.5     Strongly-typed Delegate Combine and Remove

11.6     Generalized Block Expressions

11.7     Pipeline Operator

  • Precedence, Await

11.8     New Built-In Types

  • Millisecond date literal?
  • DateTimeOffset literal?
  • DateOnly/TimeOnly literals?
  • TimeSpan literals
  • BigInteger/Half/Int128/UInt128 support (LongLong)
  • Byte array literal support?
  • Base64 literal support?

11.9     Array pseudo-type

  • IEnumerable(Of T) Shorthand?

11.10                       Unit of measure syntax?

12 Inheritance, Interface Implementation, and Extension

12.1     Implicit Interface Implementations

12.2     Signature Relaxation with `Implements`

12.3     Signature and Name Relaxation with `Overrides`

12.4     `Implements` and `Overrides` on Fields and Properties

12.5     `Overridable` and `Overrides` Classes?

12.6     Extension Properties and Events

  • Generic
  • Extension Keyword?

12.7     Extension Operators

  • Generic

13 Performance and Interoperability

13.1     Native Instruction Helpers

13.2     ByRef Structure Consumption

13.3     Unmanaged Constraint

13.4     Delegate and Enum Constraints

13.5     Explicit Iterator Structure Return Types?

14 Runtime Library Enhancements

14.1     Performance

14.2     `My` Modernization

14.3     Better Run-time Errors?

15 Deprecations?

15.1     On Error?

15.2     Options Strict?

15.2.1                       Interlude – Rules vs Guidelines

15.3     Other Options?

16 Versioning

17 Experimental