Re: YAML 2.0: drop arbitrary nodes to be used as keys

Andrey Somov <[email protected]> Wed, 2 Mar 2016 14:54:36 +0100
Newsgroups gmane.text.yaml.general
Message-ID <CALbkv0cLKkvo4hUg55dyPr=yVL4ajj_2Fq=PfhM61PKmF4Zt5Q@mail.gmail.com>
The fact that tuples are supported by Python or Scala or anything else is
not important:

- the parser creates lists, not tuples (yes, including PyYAML)
- do we care what JavaScript parser should do ? Or can just say "JavaScript
suck" and ignore ?
- collection as a key makes YAML unreadable
- collections may have sub-collections and it may be endless

For me the whole issue with YAML 2.0 is:
- inter-operability
- readability
- simplicity (for users, not for parser developers)


Those who who want to stick to one language may still use YAML 1.1.

Andrey


On Wed, Mar 2, 2016 at 1:50 PM, Roy Brokvam <[email protected]> wrote:

> Maps with tuple keys are supported and commonly used in many languages,
> it's not a Python specific thing.
>
> The hard part isn't supporting collection-valued keys as such. The hard
> part is supporting *infinite* collection-valued keys, i.e. a collection
> which contains an alias to themselves or to a parent, or which contains an
> infinite element.
>
> Supporting infinite collections as mapping keys seems unnecessary.
>
>
> Roy Brokvam
>
>
> Mvh / Kind regards
>
> *Roy Brokvam*
> Senior systemutvikler | Senior Developer
> + 47 48 04 16 60 | [email protected] <[email protected]>
>
> *Dossier Solution**s*
> Rådhusgata 30 B | NO-0151 Oslo | +47 22 11 20 90 | www.dossier.no
>
>
> Se video om hvordan Dossier sikrer høy medarbeideroppfølging
> <http://www.dossier.no/talent-management-video/>
>
> 2016-03-02 13:27 GMT+01:00 Andrey Somov <[email protected]>:
>
>>
>> >No. Tuples are immutables in Python, and can be used as keys in Python
>> dictionaries.
>>
>> This is exactly the message I would like to prevent.
>> (background - I used PyYAML a lot, as well as SnakeYAML)
>>
>> The message: it must be in YAML because it is supported by _my_language_.
>> It means that YAML ends up with every dirty trick ever invented for any
>> programming language. Do we want that ?
>> Do not we suffer now from the result of trying to put any hack to the
>> specification (1:2 is integer !!!)?
>> Should we think about inter-operability ?
>>
>> We should not implement things because it is possible, we should
>> implements things which are useful.
>> If we take only one language (regardless which one), then I am off.
>> (because then YAML is useless for me)
>>
>> All the public YAML (which I know) does not use complex keys.
>> - ansible
>> - google engine
>> - testNG
>> - RAML
>> - polyglot Maven
>>
>> Can anyone show an example of the public usage of YAML with  a complex
>> key ?
>>
>> Andrey
>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Site24x7 APM Insight: Get Deep Visibility into Application Performance
>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>> Monitor end-to-end web transactions and take corrective actions now
>> Troubleshoot faster and improve end-user experience. Signup Now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
>> _______________________________________________
>> Yaml-core mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/yaml-core
>>
>>
>

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140

_______________________________________________
Yaml-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/yaml-core