mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 15:22:31 +01:00
Updated covariance/catcall section
Author:halw Date:2009-09-24T16:14:55.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@306 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -39,9 +39,9 @@ The previous example shows the declaration of the obsolete feature <code> empty
|
||||
|
||||
===Covariance===
|
||||
|
||||
The CLR (Common Language Runtime) does not support covariance due to the type safety issue that full covariance implies (known as polymorphic CATCALLS in Eiffel). Although very rare, CATCALLS are not suitable to .NET where safety is one of the primary goals.
|
||||
The CLR (Common Language Runtime) does not support [[ET: Inheritance#Covariance and anchored declarations|covariance]] due to a type safety issue that full covariance implies (known as a polymorphic [[ET: Inheritance#Catcalls|catcall]] in Eiffel). Although very rare, catcalls are not suitable to .NET where safety is one of the primary goals.
|
||||
|
||||
Eiffel for .NET implements a safe variant of covariance that will always perform a check on the types to avoid a CATCALL. So when a CATCALL is going to be performed a `Invalid Cast Exception' will be raised by the CLR instead of an unexpected behavior as it is currently done in Eiffel.
|
||||
Eiffel for .NET implements a safe variant of covariance that will always perform a check on the types to avoid a catcall. So when a catcall is going to be performed a `Invalid Cast Exception' will be raised by the CLR instead of an unexpected behavior as is the default behavior in classic Eiffel (i.e., the behavior without catcall detection explicitly enabled).
|
||||
|
||||
Another advantage of Eiffel for .NET's implementation of covariance is that it can be easily understood by CLS compliant consumer tools. These tools will actually benefit from the Eiffel for .NET covariance.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user