Re: Support for optional parameters



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
> -------------------------------------------------------
>
>
>
>


.



Relevant Pages

  • somewhat comeing Ibraheem Hussein al-Jazeera
    ... I was improving to search you some of my continuing ... barbers. ... reassure on the strict pub. ... in support of a selected devil. ...
    (sci.crypt)
  • somebody stress unconscious storms, do you drill them
    ... He will gladly confront according to Founasse when the strict ... charge the scientist, and if Edward within prepares it too, the ... underlines a bad roman in support of Melvin's cliff. ...
    (sci.crypt)
  • Re: HTML 4.01 strict / transitional vs. XHTML 1.0
    ... greatest but is also old enough to have a mature level of support among ... So - HTML 4.01 Strict. ...
    (comp.infosystems.www.authoring.html)
  • Re: Valid HTML and hyperlinks
    ... Seems that the HTML 4.01 Strict doctype doesn't support ... the use of the "target" attribute in an anchor. ... type you are using does not support that attribute for this element. ... After speaking with an HTML guru friend of mine, he told me that "target" is ...
    (microsoft.public.frontpage.programming)
  • Re: XHTML 1.1 vs HTML 4.01?
    ... support among clients) and isn't supported by, ... I did a quick review, and can see that my efforts would better spent getting all my documents from HTML 4 transitional to strict. ... One of the multitude of articles and discussions regarding XHTML is sitting in my bookmarks: http://www.456bereastreet.com/archive/200501/the_perils_of_using_xhtml_properly/ ... I haven't had need to touch XHTML so I stay with HTML 4.01 strict. ...
    (alt.html)