Click here to Skip to main content
15,918,050 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Vb 6.0 Pin
rwestgraham13-Apr-05 19:15
rwestgraham13-Apr-05 19:15 
GeneralRe: Vb 6.0 Pin
Christian Graus13-Apr-05 19:28
protectorChristian Graus13-Apr-05 19:28 
GeneralRe: Vb 6.0 Pin
rwestgraham13-Apr-05 21:05
rwestgraham13-Apr-05 21:05 
GeneralRe: Vb 6.0 Pin
Christian Graus14-Apr-05 0:10
protectorChristian Graus14-Apr-05 0:10 
GeneralRe: Vb 6.0 Pin
Dave Kreskowiak14-Apr-05 3:34
mveDave Kreskowiak14-Apr-05 3:34 
GeneralRe: Vb 6.0 Pin
Giancarlo Aguilera14-Apr-05 7:01
Giancarlo Aguilera14-Apr-05 7:01 
GeneralRe: Vb 6.0 Pin
Christian Graus14-Apr-05 12:17
protectorChristian Graus14-Apr-05 12:17 
GeneralRe: Vb 6.0 Pin
rwestgraham14-Apr-05 10:55
rwestgraham14-Apr-05 10:55 
Christian Graus wrote:
So I *did* tell you something you can't do in C# ? It's sad, b/c I trust a C# programmer to dispose an object more than a VB programmer. The using keyword makes for nice code. You don't have it. Question answered.

It is not something you can't do in VB.NET. You simply implement the IDisposable interface. So VB.NET does not have a convenience that C# has. Big Deal. In either case, the same functionality is available. In VB.NET you can implement the code to explicitly close for example database connections, same as in C#.

In C# you could easily overlook whether someone included the "using" key word. In VB.NET you could also overlook whether someone explicitly called Dispose. I see no difference.

If anything the VB approach is clearer, because you explicitly call Dispose at the actual time the object is going out of scope. In C# you have to declare "using" when the object is created. In C# "using" can also refer to an alias for a namespace.

But in VB.NET you only have one issue to look for: Did the code call Dispose when the object went out of scope?

How can you really say this is a "feature" in C#? It is an opportunity to write confusing, bad code. VB.NET does not suffer from this "feature". It is quite clear what the code is doing - explicitly calling Dispose when the object goes out of scope. It is much more logical, much less prone to being overlooked.

Christian Graus wrote:
Deprecated features that by and large are in VB because the VB6 crowd complained. Deprecated stuff that is in use today, I've seen he production code, on new VB.NET projects.

It is the responsibility of the production teams to create and adhere to coding standards. Oner of those standards should be the use of structure error handling in VB.NET, which is the main area where a lot of deprecated features are still supported.

The problem is not the presence of deprecated features. If the coding team does not have any coding standards, they will tend to produce sh*tty code, with or without deprecated features.

Christian Graus wrote:
If I pursue a conversation like this, it's because I'm interested to see if any VBer can explain issues like magic return values ( you dodged that one

No you just did not bother to read my post other than to try to find areas to criticize. I provided a detailed explanation of why in practice the "magic return value" is a non-issue. I will not repeat myself. You can re-read my original post.


Christian Graus wrote:
On a personal level, VB's verbosity makes it look like the coding equivelant of See Spot Run, but that's just me. ...when C# is better for all the reasons I stated.

Sorry, but most of your reasons have been your opinion that all VB coders produce bad code.

Christian Graus wrote:
So why do you use VB.NET instead of C# ? Was it just comfortable for you ? You said you use C++, don't you find the VB synax annoying ? Does it really feel like programming to you ?

In C++ I am programming objects, and the code should be clear.

In VB.NET I tend to be programming GUIs which have a lot of code and event handlers. I don't have a personal bias against the See Spot Run syntax. The See Spot Run syntax you seem to dislike is an advantage in my opinion. It means I can quickly scan through a form's code and see what is doing what, because those End If and End Sub statements that you consider to be the hallmark of first grader's coding are in fact much easier to read than a page full of braces.

C# at least provides a structured IDE for coding. But spend a little time trying debug someone else's JavaScript code and you will quickly come to despise the brace syntax.

Maybe I have a personal bias against C# because instead of pandering to a previous version, it panders to J programmers, which I generally despise. Smile | :)

Robert
GeneralRe: Vb 6.0 Pin
Christian Graus14-Apr-05 12:23
protectorChristian Graus14-Apr-05 12:23 
GeneralRe: Vb 6.0 Pin
rwestgraham14-Apr-05 13:41
rwestgraham14-Apr-05 13:41 
GeneralRe: Vb 6.0 Pin
Christian Graus14-Apr-05 13:55
protectorChristian Graus14-Apr-05 13:55 
GeneralRe: Vb 6.0 Pin
rwestgraham14-Apr-05 16:00
rwestgraham14-Apr-05 16:00 
GeneralExecute Autocomplete code in a ComboBoxColumn on a datagrid Pin
VBProEd13-Apr-05 6:25
VBProEd13-Apr-05 6:25 
GeneralEvents and Windows NT Pin
KreativeKai13-Apr-05 3:14
professionalKreativeKai13-Apr-05 3:14 
GeneralRe: Events and Windows NT Pin
Dave Kreskowiak13-Apr-05 3:55
mveDave Kreskowiak13-Apr-05 3:55 
GeneralRe: Events and Windows NT Pin
KreativeKai14-Apr-05 6:37
professionalKreativeKai14-Apr-05 6:37 
GeneralRe: Events and Windows NT Pin
Dave Kreskowiak14-Apr-05 6:58
mveDave Kreskowiak14-Apr-05 6:58 
GeneralRe: Events and Windows NT Pin
KreativeKai22-Apr-05 4:04
professionalKreativeKai22-Apr-05 4:04 
GeneralRe: Events and Windows NT Pin
Dave Kreskowiak23-Apr-05 2:45
mveDave Kreskowiak23-Apr-05 2:45 
GeneralHelp with Track bar linked to mci sound Pin
steve shafa13-Apr-05 0:30
steve shafa13-Apr-05 0:30 
GeneralRe: Help with Track bar linked to mci sound Pin
Dave Kreskowiak13-Apr-05 5:23
mveDave Kreskowiak13-Apr-05 5:23 
GeneralRe: Help with Track bar linked to mci sound Pin
steve shafa13-Apr-05 6:11
steve shafa13-Apr-05 6:11 
GeneralRe: Help with Track bar linked to mci sound Pin
Dave Kreskowiak13-Apr-05 7:20
mveDave Kreskowiak13-Apr-05 7:20 
GeneralRe: Help with Track bar linked to mci sound Pin
steve shafa13-Apr-05 7:27
steve shafa13-Apr-05 7:27 
GeneralRe: Help with Track bar linked to mci sound Pin
steve shafa13-Apr-05 7:39
steve shafa13-Apr-05 7:39 

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.