Nick Ing-Simmons <[EMAIL PROTECTED]> wrote:
> e.g. 
> 
>    if (SvENCODING(sv_a) != SvENCODING(sv_b))
>     {
>      if (SvENCODING(sv_a)->is_superset_of(SvENCODING(sv_b))
>       {
>        sv_upgrade_to(sv_b,SvENCODING(sv_a));
>       }
>      elsif if (SvENCODING(sv_b)->is_superset_of(SvENCODING(sv_a))
>       {
>        sv_upgrade_to(sv_a,SvENCODING(sv_b));
>       }
>      else
>       {
>        Encoding *x = find_superset_encoding(SvENCODING(sv_a),SvENCODING(sv_b))
>        sv_upgrade_to(sv_a,x);
>        sv_upgrade_to(sv_b,x);
>       }
>     } 
> 
> Personally I would not use such a beast 

But with different encodings implemented by different SV types - each with their
own vtable - surely most of this will "come out in the wash", by the correct
method automatically being called. I thought that was the big selling point
of vtables :-)

(Or to put it another way - is the debate about handling multiple string
encodings really just the same debate as the handling of multiple numeric types
(but harder...) ?)

Reply via email to