Hacker News new | ask | show | jobs
by cm2187 2831 days ago
Well, with .net being ported to wasm, you should soon be able to use vb.net in the browser too.
2 comments

VB.Net has little to do with Basic or Visual Basic - it’s really just an alternative syntax for C#.
But it has preserved a lot of the simplicity of the basic language.

I think it’s biggest value is that it offers a bridge for business users who’s only programming experience is some VBA to a more sane and modern language.

>it’s really just an alternative syntax for C#

That's very true. Either C# or VB.NET, you're programming the NET Framework. All you can do in C# you can do in VB.NET, and even there's some features that are better implemented in VB.NET, like Type.Missing https://blogs.msdn.microsoft.com/eric_carter/2004/04/15/type...

Of course any language with "Basic" in its name will be look down, but in today's NET there's no objective reasons to do so. Nowadays, VB is a better choice than C# to develop in-house business management software.

That is a bit dated, C# fixed that problem many years ago [1]

But there are still instances where the VB.net syntax is nicer than c#, for instance date litterals, or array litterals:

C# foreach(var x in new string[] {"A", "B", "C"})

VB For Each x in {"A", "B", "C"}

Also switch statements in C# are horrendous. But there are also instances where C# has a better syntax, like "x=>x+1" is way more elegant and practical than "Function(x) x+1".

But I think the writing is on the wall. VB will go the way of Winforms, i.e. sort of supported but nothing more.

[1] https://en.wikipedia.org/wiki/C_Sharp_4.0#Optional_parameter...

Switch statements got an upgrade in v7 which makes things better

https://visualstudiomagazine.com/articles/2017/02/01/pattern...