Click here to Skip to main content
15,920,438 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Vb 6.0 Pin
Bahadir Cambel13-Apr-05 14:15
Bahadir Cambel13-Apr-05 14:15 
GeneralRe: Vb 6.0 Pin
Christian Graus13-Apr-05 15:12
protectorChristian Graus13-Apr-05 15:12 
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 
first of all, good discussion you had with CG, I enjoyed it a whole bunch! Big Grin | :-D

Dave Kreskowiak wrote:
"I for one, don't EVER leave a return value to chance, in any language. I've always used the Return statement and I've always set a default value as one of my first statements in my methods/functions."

More often than not I take advantage of the fact that the VB compiler returns the default value of a function's return type in cases where one is not provided. Why you ask? Well, it's just handy on occasions, especially during the dreaded task of UI development, where my focus is just to program against an interface, forgetting about all the implementation behind that interface. I know all I have to do is just add that one line of code you say you always add, but I just don't even worry about that, rather I just define the interface I want to work against and implement it later. I'll admit I have experienced some debugging issues as a result of doing so; that's why I wish the compiler would treat the issue as a warning, but not an error. Also, another area where I heavily use this behavior is when creating "abstract base forms". I'm sure you know that the form designer requires that the base form have a parameterless public constructor; otherwise, it blows up. Well, then how do you create an abstract base form to be used with the form designer? Well, you can't, at least I haven't been able to. So what I do is just create a non abstract base form with a series of virtual methods that don't return anything rather raise an exception when called directly, the intent being that the derived form needs to override them so that any template methods work OK. Again, I know, I know, I should just add that one line of code you add, but what can I say, I just don't, and in this case, why should I? So really, I have to disagree with you and CG. CG says it's just straight out bad, you say it's OK but you make sure never to fall to it, I say it's OK always, but that compiler should give a warning.

Finally, I once asked CG the same question, that is, what's his problem with VB. At first I just couldn't understand, but then I tried to put myself in his position of having to go through the painful task of having to work on sh*tty VB code and then his feelings seemed quite clear, although his famous words "VB.NET is crap" always make the hairs on my arms stand up in fury Mad | :mad: .

Thanks for the discussion Big Grin | :-D
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 
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 

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.