mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 14:52:03 +01:00
Small change to explanation of covariance and catcalls
Updated wikipage Eiffel for .NET Integration. (Signed-off-by:bmeyer). git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2412 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[[Property:modification_date|Fri, 29 Sep 2023 08:01:26 GMT]]
|
||||
[[Property:modification_date|Fri, 29 Sep 2023 14:14:22 GMT]]
|
||||
[[Property:publication_date|Wed, 27 Sep 2023 19:33:07 GMT]]
|
||||
[[Property:title|Eiffel for .NET Integration]]
|
||||
[[Property:weight|3]]
|
||||
@@ -47,11 +47,11 @@ Using the <code>metadata</code> tag is the most general way of applying a custom
|
||||
|
||||
===Covariance===
|
||||
|
||||
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.
|
||||
The CLR (Common Language Runtime) does not support [[ET: Inheritance#Covariance and anchored declarations|covariance]] due to a different view of type safety (the issue is known known as a polymorphic [[ET: Inheritance#Catcalls|catcall]] in Eiffel). Catcalls are possible (although very rare) in Eiffel but not in .NET.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
===Genericity===
|
||||
|
||||
|
||||
Reference in New Issue
Block a user