On Tue, Apr 24, 2012 at 12:43 PM, St�phane Ducasse <stephane.ducasse@inria.fr> wrote:
> Hi guys
>
> We should develop a simple Literal Array parser that is dialect independant
> so that we can avoid using JSON for meta data. So I will start to develop. I will start to write some tests and do it test first.
>
> Gofer new
> � �repository: 'http://ss3.gemstone.com/ss/SimpleLiteralArrayParser';
> � �package: 'SimpleLiteralArrayParser';
> � �load
>
> Now I still wonder what do we do about floats. May be the situation changed but Squeak and VW floats were not the same.
>
> I don't get it. �You define your own float format, and then each dialect parses it and converts it to their correspondant format... �Now, I do not know the format
> differences so I do not know which one take :).

It can work for simple scenario but if you save a float with e120 and save it and you get e70
then you are in trouble.

You are not in trouble. And if you are, then you are exactlty the same as if you were using a literal parser.
You have a specification. You say that floats are written in THIS XXX text representation. Nobody cares how your floats are represented inside your Smalltalk. For JSON you write floats in a particular way, explained by the JSON specification.
Then, when you code the parser, you will need to crate an instance of Float from the string. Each dialect will know how to do that.
So, again, where is the problem?
And how the literal parser would solve it?�� because I think it will happen the same.

Cheers,


Stef



--
Mariano
http://marianopeck.wordpress.com