Difference between revisions of "Talk:New CAT call"
(Fixed my original comment and responded to latest one.) |
|||
Line 1: | Line 1: | ||
''The most obvious observation is, that this weakens the new non-void typing mechanism, it is now possible to pass Void to feature f of class B2. This was probably not the intention of the programmer.'' - I do not understand this comment. Changing a:ANY into a:?STRING looks like a standard contravariant redefinition to me. Such redefinitions are sound. [[User:schoelle]] | ''The most obvious observation is, that this weakens the new non-void typing mechanism, it is now possible to pass Void to feature f of class B2. This was probably not the intention of the programmer.'' - I do not understand this comment. Changing a:ANY into a:?STRING looks like a standard contravariant redefinition to me. Such redefinitions are sound. [[User:schoelle]] | ||
− | Changing ANY into STRING is covariance, changing STRING into ANY is | + | Changing ANY into STRING is covariance, changing STRING into ANY is contravariance--[[User:Manus|manus]] 18:38, 8 November 2006 (CET) |
− | + | Changing ANY into ?STRING is contravariant. ''Could be STRING'' is more permissive than ''must be ANY'' as the first can contain any value, while the second may not contain Void. --[[User:Schoelle|Schoelle]] 10:01, 9 November 2006 (CET) | |
+ | |||
+ | Changing ANY into ?STRING is not contravariance, it is covariance. Seeing it contravariant is possible a side effect of one of the interpretation of the current standard when looking at the semantic. I think we need another terminology here to describe this unspecified semantics.--[[User:Manus|manus]] 19:24, 9 November 2006 (CET) |
Revision as of 09:24, 9 November 2006
The most obvious observation is, that this weakens the new non-void typing mechanism, it is now possible to pass Void to feature f of class B2. This was probably not the intention of the programmer. - I do not understand this comment. Changing a:ANY into a:?STRING looks like a standard contravariant redefinition to me. Such redefinitions are sound. User:schoelle
Changing ANY into STRING is covariance, changing STRING into ANY is contravariance--manus 18:38, 8 November 2006 (CET)
Changing ANY into ?STRING is contravariant. Could be STRING is more permissive than must be ANY as the first can contain any value, while the second may not contain Void. --Schoelle 10:01, 9 November 2006 (CET)
Changing ANY into ?STRING is not contravariance, it is covariance. Seeing it contravariant is possible a side effect of one of the interpretation of the current standard when looking at the semantic. I think we need another terminology here to describe this unspecified semantics.--manus 19:24, 9 November 2006 (CET)