Re: [Pharo-project] A comparative article (was Re: [squeak-dev] [ANN] STON - Smalltalk Object Notation)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] A comparative article (was Re: [squeak-dev] [ANN] STON - Smalltalk Object Notation)

Hannes Hirzel
On 5/12/12, Stéphane Ducasse <[hidden email]> wrote:
> got three days meeting this week so crawling to get my brain aligned with
> fun again…
> I will read your article. I will also look at STON because I like the object
> literal syntax too :).
Fine...!

> (note that I'm not changing my mind - I still do not get why I need
> dictionary for method meta data -

I agree; just for method meta data it is not needed.

I just checked it in Squeak 4.3, Pharo 1.4, Cuis 4.0 and Amber

      {#foo -> 1. #bar -> 42} as: Dictionary.    "fine for Squeak, Pharo, Cuis"

{#foo -> 1. #bar -> 42}   gives an Array in Amber;  #as: is not understood

But a literal array parser available in many dialects is still needed then.

For the curly brackets syntax for dynamic array there was some
discussion this week on the squeak list how it is used.

The decision by Dale and others to go for JSON was driven by the
availability of a parser for many Smalltalk dialects.

> but we are thinking (and the team should discuss for real and not just
> during lunches) that having a literal object syntax would be cool).

Great!


--Hannes

>
> Stef
>
>
>
>>> I would like to share my quick two cents regarding this subject.
>>>
>>> 1st cent. I would stick with JSON. Even though I find STON slick, I
>>> would
>>> not deviate from something that is mainstream and all Smalltalk dialects
>>> already support.
>>>
>>> 2nd cent. A Dictionary literal syntax would be useful too. I would like
>>> to
>>> have it.
>>>
>>> It could be something like #{'this' ->  1. 'that' ->  2 }, and keep {1.
>>> 2} for
>>> dynamic arrays.
>>
>> I don't want to sound like a broken record - but you do realize that I
>> wrote about this in the article and mentioned this exact syntax?
>>
>> I know, the article was a tad long - but just go to planet.smalltalk.org
>> and search down to "Sidestory: Adding literal Dictionaries to
>> Smalltalk?".
>>
>> regards, Göran
>>
>
>
>