← Prev in month ← Prev in thread

Re: [xdi] one thought about multiplicity.

From
Markus Sabadello <>
Date
2012-09-01T07:33:07+00:00
ID
Thread
Re: [xdi] one thought about multiplicity.
Oops yes, I got it backwards in the message. Thanks for fixing.
On the discussion page I think I got it right.

Regarding the cons you are listing, yes it requires more characters, but I actually don't think it's harder to read if you consider the entirety of multiplicity syntax.

Because with the proposed change, you can easily recognize all entities as looking like $(....), and you can easily recognize all attributes as looking like $!(....)

Markus

On Sat, Sep 1, 2012 at 5:58 AM, Drummond Reed <> wrote:

On Fri, Aug 31, 2012 at 3:02 PM, Markus Sabadello <> wrote:

While doing some implementation work I had a quick thought about the XdiMultiplicity page.

Basically I am thinking that attribute members of a collection should have this syntax:

+tel$!1 

rather than this:
+tel$!(!1)

This would be more consistent with the attribute singleton syntax, i.e.
$!(+tel)

See the discussion page of the proposal for details.

Markus

Markus, I think your message came out backwards, i.e.:

Current multiplicity proposal is that:

Attribute singletons NOT within a collection have this syntax: $!(+tel)

Attribute singletons within a collection have this syntax: +tel$!1

Your proposal is:

Attribute singletons NOT within a collection have this syntax: $!(+tel)

Attribute singletons within a collection have this syntax: +tel$!(!1)

I think the rationale for your proposal can be stated this way:

PROS

There is a consistency that all attribute singletons (whether inside or outside a collection) follow the pattern $!(xri) where xri is:

An i-number when the attribute singleton is a member of a collecton

A +word or $word if the attribute singleton is not a member of a collection

Code written to enforce this pattern could be easier/cleaner

CONS

It adds a minimum of three additional characters for every attribute singleton within a collection

It is more complex to read

I honestly could go either way on this one, but I would err on the side of the developer view, i.e., if developers will find easier to use a consistent pattern for all attribute singletons including the cross-reference, then I think it would be worth it despite the extra characters and decreased readability.

What do others think?

=Drummond
← Prev in month ← Prev in thread