Re: getting rid of old vb6 code
> That's IMO one of the biggest misinterpretati ons ever done.
What is? That's what the OP said he wanted:
"Is there any program available that I can get to sweep through VB.Net
projects and flag these older VB functions/things?"
[color=blue]
> Code written using the functions contained in 'Microsoft VisualBasic'[/color]
won't[color=blue]
> reduce readability and maintainability of the code.[/color]
Sure it would, to the novice programmer. If I run across: Mid(blah blah),
would I intuitively know that Mid was a string function? No. But if I see a
string object with a method after it, I know that that method must be a
string method.
[color=blue]
> In some cases, it will increase intuitivity.[/color]
Maybe, but I can't think of any. Can you?
[color=blue]
> And last bug not least, using the "old" functions won't lead to more[/color]
errors in the code.
Sure they could. Again novice programmers could use a string function on a
date, a date function on a string, a math funciton on a date, etc. This
method approach will prevent type mismatches.
[color=blue][color=green]
> > Because of the fact that the "old" functions have "new" method calls[/color][/color]
that[color=blue][color=green]
> > are more efficient, there is (again IMHO) no reason to continue their[/color][/color]
use.[color=blue]
>
> Who says that they are more efficient? Sometimes there isn't even a
> replacement in the FCL. An interesting article on this topic can be
> found here:
>
>[/color]
<http://msdn.microsoft.com/library/de...-us/dv_vstecha
rt/html/vbtchMicrosoftV isualBasicNETIn ternals.asp>[color=blue]
>[/color]
If a function has to call a method then isn't it more effecient to just call
the method directly and not have to pass data an extra time? You are right,
sometimes there isn't a replacement, and so we are not talking about ALL VB
6.0 functions.
It's also interesting in that article you posted a link to that they discuss
the Microsoft.Visua lBasic.Compatib ility namespace and say that "The
compatibility classes should not be used for new development."
The compatability namespace and the VisualBaisc namespace have certain
similarities.
[color=blue][color=green]
> > I work with a global insurance giant that recently disabled the use of[/color][/color]
this[color=blue][color=green]
> > namespace enterprise-wide as an attempt to come closer to a more OO and[/color][/color]
..NET[color=blue][color=green]
> > approach to application development.[/color]
>
> I don't see any advantages...
>[/color]
Ok, we agree to disagree.
> That's IMO one of the biggest misinterpretati ons ever done.
What is? That's what the OP said he wanted:
"Is there any program available that I can get to sweep through VB.Net
projects and flag these older VB functions/things?"
[color=blue]
> Code written using the functions contained in 'Microsoft VisualBasic'[/color]
won't[color=blue]
> reduce readability and maintainability of the code.[/color]
Sure it would, to the novice programmer. If I run across: Mid(blah blah),
would I intuitively know that Mid was a string function? No. But if I see a
string object with a method after it, I know that that method must be a
string method.
[color=blue]
> In some cases, it will increase intuitivity.[/color]
Maybe, but I can't think of any. Can you?
[color=blue]
> And last bug not least, using the "old" functions won't lead to more[/color]
errors in the code.
Sure they could. Again novice programmers could use a string function on a
date, a date function on a string, a math funciton on a date, etc. This
method approach will prevent type mismatches.
[color=blue][color=green]
> > Because of the fact that the "old" functions have "new" method calls[/color][/color]
that[color=blue][color=green]
> > are more efficient, there is (again IMHO) no reason to continue their[/color][/color]
use.[color=blue]
>
> Who says that they are more efficient? Sometimes there isn't even a
> replacement in the FCL. An interesting article on this topic can be
> found here:
>
>[/color]
<http://msdn.microsoft.com/library/de...-us/dv_vstecha
rt/html/vbtchMicrosoftV isualBasicNETIn ternals.asp>[color=blue]
>[/color]
If a function has to call a method then isn't it more effecient to just call
the method directly and not have to pass data an extra time? You are right,
sometimes there isn't a replacement, and so we are not talking about ALL VB
6.0 functions.
It's also interesting in that article you posted a link to that they discuss
the Microsoft.Visua lBasic.Compatib ility namespace and say that "The
compatibility classes should not be used for new development."
The compatability namespace and the VisualBaisc namespace have certain
similarities.
[color=blue][color=green]
> > I work with a global insurance giant that recently disabled the use of[/color][/color]
this[color=blue][color=green]
> > namespace enterprise-wide as an attempt to come closer to a more OO and[/color][/color]
..NET[color=blue][color=green]
> > approach to application development.[/color]
>
> I don't see any advantages...
>[/color]
Ok, we agree to disagree.
Comment