ODP: Pluralize plurals

I’d stick to the meaning in terms of RDF as well. Going this way we’d end up with all prulars as there is nothing that prevents me from adding yet another statement in RDF with same subject and predicate.

As for languages, let’s them poke with using it in their own ways. JavaScript will have it’s JSON-LD with contexts where every developer can frame the data the way they’d like to have, in C# you could either use Newtonsoft.JSON and C# dynamic to do the same or use more sophisticated ORM-like RDF to C# contracts solution as RomanticWeb. In Java there is also a similar RDF to Java contracts mapping approach, some may stick to old-school plain RDF handling in Jena. I think everyone will find something suitable for them thus let’s not make peaple happy forcibly.

Regards

Karol Szczepański


Od: Asbjørn Ulsberg
Wysłano: sobota, 26 września 2015 00:53
Do: Tomasz Pluskiewicz
DW: Hydra
Temat: Re: Pluralize plurals


2015-09-25 21:23 GMT+02:00 Tomasz Pluskiewicz <tomasz@t-code.pl>:
I don't agree. JSON-LD naturally stems from the JavaScript land, where JSON also originated. JavaScript is often used in a way where a given parameter accepts either a single element or an array.

That might be, but in order for Hydra to be interoperable with less dynamic languages like Java, C#, etc., properties should either be singular or plural. That is, their type should either be a single item or an array, not both.
 
In such cases I would expect a singular form. For example in knockout validation it is possible to supply a single custom validator or an array [1]. . Plural would mean that an array is always expected, which is not true.

Using an array would mean a plural form would always be right, but you could still have only one item in the array, meaning you still support the use-case of only having a single validator. If you want multiple values, use an array, even though the array may contain only one item.
 
To back it up, consider a JSON-LD document, where a property is defined as "@container": "@set" (or list). Both a single element or JSON array produce equal expanded JSON-LD and triples. See playground examples [2] and [3]. Thus I think that it isn't necessary to do what you propose and may arguably be less confusing than you fear.

Synonymous words to "list", such as "collection", "array", "set", "dictionary", "matrix", etc., naturally have a singular form even though their type takes some sort of plural form, because the words themselves describe the outer data structure and not in any way what the semantics of the items within the structure mean.

So while the type of a property called "operations" naturally can be of a type "@set" in singular form, the correct spelling of "operations" would be in plural form to indicate that "this is a property whose data type is @set, where each item in the set is an operation".

You should not have to reflect on the value of the property to understand the semantics of the property, imho. Since we're able to map this in JSON-LD, I think we should.

-- 
Asbjørn Ulsberg           -=|=-        asbjorn@ulsberg.no
«He's a loathsome offensive brute, yet I can't look away»

Received on Sunday, 27 September 2015 19:36:35 UTC