[Mono-list] Mixed programming languages
Andreia Gaita
shana.ufie at gmail.com
Wed Feb 28 08:21:33 EST 2007
On 2/28/07, tom potts <madtom1999 at yahoo.com> wrote:
> Granted it might impose further requirements in the
> code but to have a VB.NET programmer extend something
> written in C# without having to convert the code could
> be a massive plus for mono.
> I say this as someone who had to learn VB.NET when I
> was already fluent in C# and now stutter in both languages..
I don't see why it should be necessary to write one project (one set
of classes compiling to a single assembly) in several languages. If
you want to extend a class, you create a project referencing the
assembly where the class resides in, and extend it, without thought to
which language the to-be-extended-class was written in. There's no
reason for rewriting the original code to change the language, of
course, since the key word is extend (in a new assembly), not rewrite.
Since it is possible to split the same namespace through more than one
assembly, you need not add classes to a VB.NET project to add more
functionality to that namespace if what you really want is to program
in C#; you just create a new assembly on the namespace and add what
you need to it. If you need to add features to a class, you can
inherit from it, or if it's un-inheritable you can always write a
wrapper. There's so many different ways to make things work without
having to mix languages within one assembly, I really don't see the
point. Maybe I'm missing something? :p
shana
More information about the Mono-list
mailing list