Thanks eliot 
I was thinking that having the same consistent behavior is cool.
What we could do is snapshot, for example, we say that Cog will only for 
1.2Pharo and like that this may help you.


> > I don't think Eliot changed that, he only changed Integer>>hex...
> 
> No he did
> http://code.google.com/p/pharo/issues/detail?id=2705
> 
> Item was changed:
>  ----- Method: Character>>hex (in category 'printing') -----
>  hex
> +       ^value printStringBase: 16!
> -       ^value hex!
> 
> and that is a mistake.  It should stay the way it was and then Character hex 
> would also have the 16r prefix.

ok I thought you had a specific need. So now I understand :)

> 
> But I'm caught between two stools, whether to move forward and make Character 
> hex answer 16rXX or to move back and make Integer hex answer XX, and e.g. use 
> phex for 16r...  

I like 16r for hex and printStringHex for XX

> Our  Teleplace images make heavy use of hex and assume it answers 16rXX so if 
> we don't keep the 16r prefix I'll have to maintain a fork of the Cog VMMaker 
> and that would make life even more difficult (I already have three forks, 
> open-source Cog, production Teleplace and development Teleplace (threaded & 
> separate ObjectMemory and Interpreter) but they all agree w.r.t. hex.

For me this is good I like hex 16rXX but I would like Character hex to be 
consistent.

> 
> If you think adding the prefix to Character won't do too much harm then 
> revert the change above so Character hex reads (as it does in our Teleplace 
> images)
> 
> Character hex
>     ^value hex
> 

I really suggest that we (pharo and squeak) do that
        $A hex '16r41'

and we can add printString hex to character
Character>>printStringHex
        ^value printStringBase: 16


Stef

> 
> 
> 
> > It seems that every implementation of hex did avoid to print the radix in 
> > Squeak 3.10. Was it intentional ?
> >
> > Anyway, it will be hard to reach homogeneity because:
> >   Integer>>hex should print the radix for VMMaker compatibility
> >   ByteArray>>hex shouldn't for cypto compatibility
> 
> but crypto could use printStringHex so yes we can reach it.
> 
> >
> > Nicolas
> >
> > 2010/7/21 Stéphane Ducasse <[email protected]>
> > Levente /Eliot
> >
> > I noticed that
> >
> > $A hex on squeak
> >        -> 41
> > and in pharo
> >        -> '16r41'
> >
> > I would like to have both consistent what do you think to have
> >
> > $A hex
> >        -> '16r41'
> >
> > $A printStringHex
> >        -> '41'
> >
> > like that this is consistent with the behavior on integer.
> > Eliot I saw that to change the behavior on characters and I would like to 
> > know why.
> > I thought that it was for debugging purpose.
> >
> > Stef
> >
> >
> >
> > _______________________________________________
> > Pharo-project mailing list
> > [email protected]
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >
> > _______________________________________________
> > Pharo-project mailing list
> > [email protected]
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> 
> 
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> 
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to