Difference between revisions of "Talk:Void-safe migration guide"
Line 9: | Line 9: | ||
:'''--[[User:Manus|manus]] 18:27, 3 August 2009 (UTC)''': Of course here you have not much choice and you either have to rewrite `A' and/or define a new CELL class that has ''default_create'' as a creation procedure. The real question is how much of this code actually exists and the impact of rewriting the code that depended on that. Another solution is to modify `default_create' in ANY to have a precondition re-definable by descendants so to leave your code unchanged, in this case `CELL' would say it is ok to use ''default_create'' but only when the actual generic parameter is detachable. | :'''--[[User:Manus|manus]] 18:27, 3 August 2009 (UTC)''': Of course here you have not much choice and you either have to rewrite `A' and/or define a new CELL class that has ''default_create'' as a creation procedure. The real question is how much of this code actually exists and the impact of rewriting the code that depended on that. Another solution is to modify `default_create' in ANY to have a precondition re-definable by descendants so to leave your code unchanged, in this case `CELL' would say it is ok to use ''default_create'' but only when the actual generic parameter is detachable. | ||
+ | |||
+ | ::--[[User:Ericb|Ericb]] 07:37, 4 August 2009 (UTC): You have to keep in mind that ECMA says that the precondition of creation procedures should not have unqualified calls. Also, for the issue with CELL, I think that I was the one who used this example (which occurs in existing code) to try to bring the attention that void-safety goes against reusability. From there, void-safety proponents tried to show that there was actually no problem, but most of them didn't address the reusability issue. That's why I put this note here, to remind people what the real problem is with the CELL example. |
Revision as of 22:37, 3 August 2009
--Ericb 14:34, 2 August 2009 (UTC)': The problem about not having `default_create' as creation procedure in CELL anymore, even when the actual generic parameter is detachable, is not just an expandedness issue. What do we do with code like that:
class A [G -> ANY create default_create end] ... end a: A [CELL [detachable FOO]]
- --manus 18:27, 3 August 2009 (UTC): Of course here you have not much choice and you either have to rewrite `A' and/or define a new CELL class that has default_create as a creation procedure. The real question is how much of this code actually exists and the impact of rewriting the code that depended on that. Another solution is to modify `default_create' in ANY to have a precondition re-definable by descendants so to leave your code unchanged, in this case `CELL' would say it is ok to use default_create but only when the actual generic parameter is detachable.
- --Ericb 07:37, 4 August 2009 (UTC): You have to keep in mind that ECMA says that the precondition of creation procedures should not have unqualified calls. Also, for the issue with CELL, I think that I was the one who used this example (which occurs in existing code) to try to bring the attention that void-safety goes against reusability. From there, void-safety proponents tried to show that there was actually no problem, but most of them didn't address the reusability issue. That's why I put this note here, to remind people what the real problem is with the CELL example.