Closed ryotayamanaka closed 8 months ago
No, but I'd suppport extending the Direction
rule to also include <-
.
Need to consider whether <-
improves usability.
FYI,
Formatter https://g2glab.github.io/pg-formatter/
Visualization https://sandbox.blitzboard.io/
Thank you for the suggestion!
We also need to consider if <-
should exist or not.
This implementation is based on the definition of the ISWC paper below (Definition 5): https://arxiv.org/abs/2203.06393
So, we should update this definition if it is necessary.
I stick to the property graph model (Definition 4 in https://arxiv.org/abs/2203.06393). The model is too abstract to directly be serialized so there are two minor differences in my current implementation (can be discussed):
NODE_ID
). You seem to allow numbers and strings, I changed to only allow strings so 1
is read as "1"
(otherwise there could be two confusing nodes with distinct ids 1
and "1"
)So, we should update this definition if it is necessary.
For a final specification it needs to be updated anyway because NODE_ID
, STRING
and NUMBER
are not included and whitespace should better be included as well. I'll try to write a proposal to be discussed.
To be honest, I don't see the necessity for <-
.
Pros(?)
->
,
nor is it a shorthand expression (i.e., it does not reduce typing or size).
Might be useful for people who frequently change directions(?)Cons
Once this notation is recognized as valid, all applications and visualizers developed so far should also adapt to it. Things might get complicated.
If <-
is allowed, users may come up with even more complicated notations,
e.g., a <- b -> c
But it is difficult to support such notations.
<
is typically observed at the beginning of strings for expressing URIs.
Therefore, I do not want it to be a special character.
If the merit is limited, then we should keep the specification simple.
Thanks for summary of your arguments! For me it seemed just a minimal backwards-compatible addition to syntax which is being extended anyway. I can roll back the implementation in pgraphs and move the idea to the list of possible extensions not to be included in version 1.0.0 of PG format, if you prefer.
I've update pgraphs so with version 0.4.0 direction <-
is not allowed in PG format. This issue can be closed.
is the syntax.
allows?