Re: globals?



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

.



Relevant Pages

  • Re: part 21 asserts forth best for small memory systems, would lisp be better in non small mem?
    ... libraries, servers, and applications alike ... ... Libraries: FSL, TOOLBELT, shuttlepad string handling (don't ask and I ... Servers: ThePanel text-driven fullscreen interactive user interface ... from simple FACILITY through to a rich ...
    (comp.lang.forth)
  • Re: Track Changes in Rich Text Editor
    ... The libraries are only rich text editors. ... They do not have a facility ...
    (comp.lang.javascript)
  • Re: Paul Grahams Arc is released today... what is the long term impact?
    ... it will bring us even closer to what a programming language would ... reasonable to expect libraries that are true innovations and ... Even if you cannot get 100% of the design of Arc with any of the existing Lisp dialects, but only 99% or 98%, I would still stick to my claim. ...
    (comp.lang.lisp)
  • Re: ftp client in C
    ... Ritchie, "The C Programming Language", 1st and 2nd editions). ... support must be provided by additional libraries, ... You say you're using Borland C++. ... the source distribution and take a look at docs/INSTALL, searching for ...
    (comp.lang.c)
  • Re: compilation of ms crypto api program
    ... >> I'm not talking about teaching a programming language, ... Image Processing and Modern Control Theory ... the libraries, that can either standard libraries that ... Like C and C++, Java ...
    (sci.crypt)