.NET Architecture—The importance of strong data typing for language interoperability
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| CSharp-Online.NET:Articles |
| .NET Articles |
| © 2006 Wiley Publishing, Inc. |
The importance of strong data typing for language interoperability
If a class is to derive from or contains instances of other classes, it needs to know about all the data types used by the other classes. This is why strong data typing is so important. Indeed, it is the absence of any agreed system for specifying this information in the past that has always been the real barrier to inheritance and interoperability across languages. This kind of information is simply not present in a standard executable file or DLL.
Suppose that one of the methods of a Visual Basic 2005 class is defined to return an Integer—one of the standard data types available in Visual Basic 2005. C# simply does not have any data type of that name. Clearly, you will only be able to derive from the class, use this method, and use the return type
from C# code, if the compiler knows how to map Visual Basic 2005’s Integer type to some known type that is defined in C#. So how is this problem circumvented in .NET?
|

