Constrained genericity: Difference between revisions
Content deleted Content added
→{{header|C++}}: Code moved to discussion page because concepts were voted out of C++ |
→{{header|Perl 6}}: again incorrect |
||
Line 329:
Unfortunately, it is kind of cumbersome in that, for every type parameter we want to use for this generic type, we will have to explicitly create a module for the resulting type (i.e. <tt>BananaBox</tt>, <tt>FloatBox</tt>). And the operations on that resulting type (i.e. <tt>make_box_from_list</tt>) are tied to each specific module.
=={{header|Perl 6}}==
{{incorrect|Perl 6|While now the conditioning on existence of eat function seems to be right, now instead of a generic type which can be instantiated for specific food types, there's one single foodbox variable where any type of food can be put in.}}
<lang perl6>
|