[Mono-list] Visual Basic 6 Support

A Rafael D Teixeira rafaelteixeirabr@hotmail.com
Fri, 28 Feb 2003 12:29:20 -0300

>From: Pomerantz Daniel <dmprantz@yahoo.com>

>question:  Has there been any discussion of implementing a CIL compiler
>for Visual Basic as the language existed in MS VB 6.0?

Shortly, in the beginning we discussed, but we decided to go with 
VB.NET-Syntax only because:

1 - VB.NET is still very VB6-like and many VB-isms are still there like the 
MID(,,) statement, for example. What was left out in VB.NET surely deserve 
to be so... like DEFINT, DEFSNG...

2 - Only 2 changes are trully annoying for VBSixers: get used to drop the 
SET statement for simple object assignment and therefore the lack of default 
properties, and get used to zero-based arrays. But I think the syntax is 
clearer now...

3 - The real problem isn't the syntax changes, but about having to learn the 
class library to rewrite most of your code because ADO.NET is very different 
from ADO, System.Xml is very different from MSXML, and so on... Although you 
can call any of those COM technologies from Managed Code, it has serious 
performance and compatibility problems (Firsthand experience on a large 
project I'm working), so you have to learn the new way of doing things.

4 - Besides, it URGES to extend VB6 syntax to have access to the whole of 
.NET runtime features. Things like Serialization, Declarative Security, COM+ 
Interop, Web Services, etc..., depend on Attributes, for instance, so people 
will need to cope with syntax additions, anyway.

5 - Also when dealing with the class library, concepts like inheritance and 
overloading are fundamental, and have to be expressed by the language 
syntax, and understood by the developer, so that he can make good use of the 
features provided. Just and example: there are 14 (fourteen) overloaded 
constructors for the XmlTextReader class, that is used to read some xml that 
exists in text form.

Said all that... mbas is being developed to be 100% compatible with VB.NET. 
Also in the plans are some extensions to the language, but we thought of 
advancing it, with things like functional programming, and not in making it 
backwardly compatible with VB6.

But you can start a project to that purpose, looking at mcs/mbas as a 
reference implementation of sorts. You can also look at GnomeBasic work, for 
an working version of a VB6-syntax compiler but that targets native code, 
instead of MSIL.

Happy hackings,

Rafael Teixeira
Brazilian Polymath
Mono, MonoQLE Hacker

Tired of spam? Get advanced junk mail protection with MSN 8.