Zev Spitz
Zev Spitz
@KathleenDollard > moderate improvements in keystroke/line count with a new layer of conceptual thinking The primary benefits are a more precise representation of the logic behind the code: * when...
@Bill-McC > I think it adds complexity to the code Only as a reflection of the complexity of the underlying code logic. Currently, if my code deals with some object/value...
@Bill-McC @KathleenDollard @AnthonyDGreen Any further thoughts on this?
@KathleenDollard There is one possible reason why this would be more attractive in VB.NET over C# -- "classic" VB didn't have overloads and was limited to a single function name...
@Berrysoft True. However, since we're talking about the compiler rewriting this: Function Foo(one As String Or Uri) If TypeOf one Is String Then one = New Uri(one) 'do something with...
@Berrysoft Of course, for interop purposes, the casting operators would be very valuable; and in fact the F# compiler does this with discriminated unions with multiple types.
Shoutout to the [OneOf](https://github.com/mcintyre321/OneOf) library, which allows creating union types in .NET.
Or perhaps: ``` If obj Matches String Into s AndAlso s.Length > 0 Then End If ``` Two keywords, no parentheses, and doesn't repurpose an existing keyword for wildly different...
> Matches is a new keyword ... in a wrong context. It refers to regular expressions and doesn't indicate types. When you work with regular expressions, you write a pattern...
> I am against the C# type-b4-var style, period. It is not a VB style and must not be. You're not alone. Eric Lippert lists the C# variable declaration style...