Zev Spitz
Zev Spitz
@bandleader Do we need pattern matching? Even if all we implemented was [composable types](https://github.com/dotnet/vblang/issues/47), wouldn't that be enough?
I have a few issues with this: 1. What happens with assignable types? Presumably `String` should also match on `IEnumerable(Of Char)`: Dim x As Object = "abcd" Select TypeOf x...
> I see this syntax more readable. I think it's only because you associate declaring a variable with ` x As `. But consider -- the main point of the...
> In fact, we need VB to allow declaring variables in place everywhere, such as: > `Dim x = Integer.TryParse(inputVar, outVar As Integer)` > So, this is how VB declare...
> we already match patterns for ever Absolutely, using `Select Case`: ``` Dim i As Integer '... Select Case i Case "a" Console.WriteLine("Matches the ""a"" pattern") Case > 5, 10...
@paul1956 The first code snippet is covered by #172, making the following code valid: ``` If TypeOf Something Is SomeType Then Something.MethodOfSomeType 'because Something is typed here as SomeType Else...
> How does C# handle the writeline(x) in the else? I think it's a compilation error, and I propose the same for VB.NET. In the following code: ``` Dim x...
[Again](https://github.com/dotnet/vblang/issues/541#issuecomment-655476974), why do you think the start of the `Select` block needs to be anything other than `Select t`? At a minimum, you should want to have the flexibility of...
Yes, you're right. The `Case` clauses need to be reordered. Edited.
It depends what the goal is, as I noted [here](https://github.com/dotnet/vblang/issues/542#issuecomment-656077842). If the goal is generalized pattern matching, then there's no reason why this shouldn't be allowed even under `Option Strict`;...