Hacker News new | ask | show | jobs
by cm2187 2839 days ago
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...

1 comments

Switch statements got an upgrade in v7 which makes things better

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