![]() |
|
[.NET] Visual Basic - The hard facts about bad habits - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Visual Basic - The hard facts about bad habits (/showthread.php?tid=4634818) |
Visual Basic - The hard facts about bad habits - Win95 - Jan 13, 2015 I'm looking for experienced Programmers to help me clear a few things up in my head. What does Visual Basic truly teach that can be considered a bad habit? I've read opinions online and searched multiple times for facts, I'm just asking here now. VB.NET is going to be my first Programming Language, Regardless. Thanks in advance for any information. * - +Haze - Jan 13, 2015 In some cases VB.NET is more forgiving with data types conversion. Even with Option Strict On. This code works fine. Dim age As Integer = Console.ReadLine() Console.ReadLine() returns a string, so if it returns a string then really an truly I shouldn't be able to assign it to the integer without converting the Console.ReadLine() returned string into an Integer. I know in the background, the VB.NET compiler actually converts it for us. I checked using a decompiler :p but still. Whereas in C#. You'd have to convert the ReadLine() so int age = Convert.ToInt32(Console.ReadLine()); * - Odus - Jan 13, 2015 It doesn't 'teach' any bad habits. You either program well or poor regardless of language. The things actual programmers hate (OERN, GoTo, implicit types, poor structure etc.) are there because Visual Basic was designed to get things done quickly hence its forgiving nature. What we see today was not the same image as that from its conception-- this is dating back to 1990(ish) with BASIC and VBA with Excel & the office family. |