Re: globals?
- From: "Herfried K. Wagner [MVP]" <hirf-spam-me-here@xxxxxx>
- Date: Sat, 27 Jan 2007 18:37:09 +0100
Tom,
"Tom Leylan" <tleylan@xxxxxxxxxx> schrieb:
Languages aren't (necessarily) supposed to be rich. The language should be straightforward, the libraries should be rich.
I don't think it's easy to decide where to draw the border between something being supported explicitly in the programming language's syntax or exposed as part of a library only. Take C#'s 'using' keyword as an example:
C# 1.0:
\\\
using (FooDialog f = new FooDialog())
{
...
}
///
vs. VB.NET 2002:
\\\
Dim f As New FooDialog()
Try
...
Catch
Finally
f.Dispose()
End Try
///
One could argue that 'using' is only a shortcut, and it's actually nothing more than a shortcut. But it adds an additional keyword to the programming language and thus makes the programming language more rich (or complex, harder to learn). Well, it doesn't count that C# overloads the meaning of the 'using' keyword here, which adds an additional level of complexity to the language BTW!
However, we are talking about a rich library and not about a rich programming language. "Microsoft.VisualBasic.dll" is simply a .NET-based class library containing some modules and classes (which are mostly based on the .NET Framework's BCL) and some additional features not being present in the .NET Framework's BCL. The Visual Basic Runtime Library can even be used together with C# without any problems, except that importing the modules is not done automatically.
Nothing prevents C# developers from creating a rich set of alternative
functions so they can use UCase() instead of .ToUpper().
Nothing prevents C# developers from adding a reference to "Microsoft.VisualBasic.dll" and using the functionality provided by this DLL.
You're still making it a VB vs C# thing and it isn't. It is (the DotNet family of languages including VB.Net) vs some compatibility layer in VB.Net. We're not dumb if Str() and Sin() and UCase() were excellent ways to save time everybody and their mother would simply write such things. :-)
Are we to believe that only VB is clever enough to have thought of this? Or that C# developers like to waste time typing? Step back a moment and try to understand we'd adopt anything that was a good idea. Option Explicit Off was never a "really cool thing that C# doesn't have." It was a dumb idea that cost untold millions in lost time and money debugging things.
I have to disagree. Classic VB has been largely used for prototyping applications later developed using other programming languages because it provided 'Option Explicit Off'-style functionality. I do not claim that everybody should work with 'Option Strict Off', but it's a neat feature in some cases, especially when dealing with Office automation and/or targetting different incompatible versions of certain libraries.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
.
- Follow-Ups:
- Re: globals?
- From: Tom Leylan
- Re: globals?
- References:
- globals?
- From: Smokey Grindle
- Re: globals?
- From: Herfried K. Wagner [MVP]
- Re: globals?
- From: Tom Leylan
- Re: globals?
- From: Herfried K. Wagner [MVP]
- Re: globals?
- From: Tom Leylan
- Re: globals?
- From: Michel Posseth [MCP]
- Re: globals?
- From: Fabio
- Re: globals?
- From: Herfried K. Wagner [MVP]
- Re: globals?
- From: Michel Posseth [MCP]
- Re: globals?
- From: Tom Leylan
- globals?
- Prev by Date: Re: globals?
- Next by Date: Re: globals?
- Previous by thread: Re: globals?
- Next by thread: Re: globals?
- Index(es):
Relevant Pages
|