Click here to Skip to main content
14,495,540 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: How I loathe the Code DOM Pin
Sander Rossel24-Nov-19 23:38
professionalSander Rossel24-Nov-19 23:38 
GeneralRe: How I loathe the Code DOM Pin
honey the codewitch24-Nov-19 23:40
mvahoney the codewitch24-Nov-19 23:40 
GeneralRe: How I loathe the Code DOM Pin
Sander Rossel24-Nov-19 23:48
professionalSander Rossel24-Nov-19 23:48 
GeneralRe: How I loathe the Code DOM Pin
honey the codewitch24-Nov-19 23:50
mvahoney the codewitch24-Nov-19 23:50 
GeneralRe: How I loathe the Code DOM Pin
Sander Rossel25-Nov-19 0:51
professionalSander Rossel25-Nov-19 0:51 
GeneralRe: How I loathe the Code DOM Pin
honey the codewitch25-Nov-19 0:54
mvahoney the codewitch25-Nov-19 0:54 
GeneralRe: How I loathe the Code DOM Pin
Jörgen Andersson25-Nov-19 0:54
professionalJörgen Andersson25-Nov-19 0:54 
GeneralRe: How I loathe the Code DOM Pin
Sander Rossel25-Nov-19 1:36
professionalSander Rossel25-Nov-19 1:36 
Jörgen Andersson wrote:
And what's the problem with that?
You wouldn't be asking me this is you saw the VB code I had to work with Laugh | :laugh:
I used to love VB.NET, even after I started doing C#.
But after years of doing C# I now have to use it again and it's just lagging behind in pretty much everything.
The fact that Option Strict is off by default (causing much of my current problems) makes it bad by default.
Sub and Function As Object (or worse, just Function without an As clause because that's optional without Option Strict) feels weird.
The default indentation in Visual Studio sucks.
If something AndAlso
   somethingElse Then
   DoSomething()
   ThisIsAlsoAFunction ' But notice the lack of () because that's optional
End If
Keywords like End Function, AndAlso and OrElse are unnecessarily long.
Don't even get me started on lambda's! collection.Where(Function(x) x.Something) vs. collection.Where(x => x.Something)!
Meanwhile, shortcuts like inline ref variables don't make it to VB.
Because it's not case sensitive myVar and MyVar are the same, meaning I sometimes need to think just a bit harder to name my variables.
Static classes don't exist, you need a Module, but that's slightly different (in that functions become public without the need of using the class name) making a Private Class with Private Sub New() the closest to a static class.
And please don't use the default VB namespace Modules that are imported by default!
If I'm honest, I've never seen good VB code that I didn't write myself, while I've seen some good C# code.
Microsoft is quickly dropping support for new platforms and VB.
It's only just been added to .NET Core with version 3, together with WinForms support.
Try finding (good) code samples for VB online.
Even newer Visual Studio functionality, like code cleanup, is not available for VB.
All in all, I have no reason whatsoever (or even a choice) to use VB in any modern software development.

Let me end with a small positive note for the language I started in.
One thing VB does right (in WinForms development) is Sub MyButton_Click(sender As Object, e As EventArgs) Handles MyButton.Click, which I find more clear than the C# way of adding a handler in the designer.

GeneralRe: How I loathe the Code DOM Pin
Jörgen Andersson25-Nov-19 7:52
professionalJörgen Andersson25-Nov-19 7:52 
GeneralRe: How I loathe the Code DOM Pin
Sander Rossel25-Nov-19 21:53
professionalSander Rossel25-Nov-19 21:53 
GeneralRe: How I loathe the Code DOM Pin
Jörgen Andersson25-Nov-19 22:36
professionalJörgen Andersson25-Nov-19 22:36 
GeneralRe: How I loathe the Code DOM Pin
Sander Rossel25-Nov-19 23:19
professionalSander Rossel25-Nov-19 23:19 
GeneralRe: How I loathe the Code DOM Pin
Jörgen Andersson25-Nov-19 23:37
professionalJörgen Andersson25-Nov-19 23:37 
GeneralRe: How I loathe the Code DOM Pin
Richard Deeming26-Nov-19 9:42
mveRichard Deeming26-Nov-19 9:42 
GeneralRe: How I loathe the Code DOM Pin
Sander Rossel26-Nov-19 10:42
professionalSander Rossel26-Nov-19 10:42 
Rantall these C#8 language feature additions and yet Pin
honey the codewitch24-Nov-19 11:50
mvahoney the codewitch24-Nov-19 11:50 
GeneralRe: all these C#8 language feature additions and yet Pin
harold aptroot24-Nov-19 12:03
Memberharold aptroot24-Nov-19 12:03 
GeneralRe: all these C#8 language feature additions and yet Pin
honey the codewitch24-Nov-19 12:05
mvahoney the codewitch24-Nov-19 12:05 
GeneralRe: all these C#8 language feature additions and yet Pin
Super Lloyd24-Nov-19 12:51
MemberSuper Lloyd24-Nov-19 12:51 
GeneralRe: all these C#8 language feature additions and yet Pin
honey the codewitch24-Nov-19 12:53
mvahoney the codewitch24-Nov-19 12:53 
GeneralRe: all these C#8 language feature additions and yet Pin
Super Lloyd24-Nov-19 13:12
MemberSuper Lloyd24-Nov-19 13:12 
GeneralRe: all these C#8 language feature additions and yet Pin
honey the codewitch24-Nov-19 13:17
mvahoney the codewitch24-Nov-19 13:17 
GeneralRe: all these C#8 language feature additions and yet Pin
Shuqian Ying24-Nov-19 13:43
MemberShuqian Ying24-Nov-19 13:43 
GeneralRe: all these C#8 language feature additions and yet Pin
honey the codewitch24-Nov-19 13:47
mvahoney the codewitch24-Nov-19 13:47 
GeneralRe: all these C#8 language feature additions and yet Pin
Shuqian Ying24-Nov-19 14:19
MemberShuqian Ying24-Nov-19 14:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.