Sponsored Ad

Thursday, October 22, 2009

Strong Data Typing

A very important aspect of IL is based on exceptionally strong data typing. That means that all variables are clearly labeled as a particular, specific data type (no space in IL, of eg for Variant data type recognized by Visual Basic and scripting languages). In particular, IL usually do not allow operations that result in ambiguous data types.

For example, the Visual Basic 6 is used to pass variables without having to worry too much about their fees, because Visual Basic 6 automatically performs type conversion. C + + developers are commonly used as indicators between the different types. Being able to perform this type of operation can be great for performance but it breaks type safety. Therefore, only allowed  in certain circumstances, some of the languages that compile to managed code. In fact, pointers.

as opposed to references) are only allowed in marked blocks of code in C #, and not all in Visual Basic (although they are allowed in C + +). Using Pointers in code that fails does Memory type - the security checks performed by the CLR.
You should be aware that some languages that support. NET, including Visual Basic 2008, still allow some laxity in the definition, but that is only possible because the editors behind the scenes to ensure that the type of
security is applied in the IL emitted.

Although initially the application of type safety may appear to impair performance in many cases the benefits of
obtained from its services. NET depending on the type of security far outweigh this performance loss.
These services include:

  • Language interoperability
  • Garbage collection
  • Security
  • Application domains

The importance of Strong data typing for language interoperability

Used by other classes. This is why strong data typing is so important. In fact, is the absence of any agree - the system to specify this information in the past it has always been the real obstacle to inheritance and interoperability between languages. Such information is simply not present in a executable or DLL file standard.

Suppose one of the methods of a class of Visual Basic 2008 is defined to return an integer - one of the standard data types available in Visual Basic 2008. C # simply does not have any data that name. Obviously, you will be able to derive from the class, use this method and use the return type of C # code only if the compiler knows how to map Visual Basic 2008 's Integer known that some form
defined in C #. So how is this problem eludes. NET?

0 comments:

Post a Comment

Sponsored Ad

Website Update

Followers