Re: Support for optional parameters
- From: "Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 24 Oct 2005 11:32:13 -0400
The reason that C# doesn' t have support for optional paramaters is that
they don't exist. VB.Net creates the illusion that they do, by creating
overloads behind your back. VB.Net does have support for overloading, and
this is a good thing. However, making C# more like VB.Net is (IMHO) putting
the cart before the horse.
C# is much stricter than VB.Net, and strictness is a good thing. I believe
that support for optional parameters in VB.Net is more an accomodation for
VB6 developers than anything that serves any logical purpose, like the
support for Modules, and the default of Option Strict being turned OFF.
Modules, and turning Option Strict OFF opens a whole world of potential
problems for the developer. In fact, I believe that VS.Net 2005 has Option
Strict turned ON by default, as a result of the problems caused by having it
off in the previous versions.
VB.Net is NOT VB. It only looks like it. VB.Net is fully object-oriented,
and much more powerful than VB6. As such, it needs to enforce more of the
constraints that powerful programming technologies need to prevent accidents
from occurring. C# does this, and that is one major reason that I prefer
working with it. I would love to see VB.Net made as powerful as C#, such as
adding support for unsafe code and pointers, for example.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
A watched clock never boils.
"Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
news:%23RuKQqK2FHA.556@xxxxxxxxxxxxxxxxxxxxxxx
> I'm not sure why C# has no support for it. Without knowing why, I won't
> criticize it.
>
> Anybody care to join me in pleading for that kind of support? Or at least
> shed some light on what it isn't being done since there is support for it
> in
> VB
>
> --
> Regards,
> Alvin Bruney [MVP ASP.NET]
>
> [Shameless Author plug]
> The Microsoft Office Web Components Black Book with .NET
> Now Available @ www.lulu.com/owc
> Forth-coming VSTO.NET - Wrox/Wiley 2006
> -------------------------------------------------------
>
>
>
>
.
- Prev by Date: Re: System.Management?
- Next by Date: Re: Show/hide mouse pointer.
- Previous by thread: manifest definition error
- Next by thread: Re: Support for optional parameters
- Index(es):
Relevant Pages
|