On Wednesday 22 October 2003 05:40 am, Paul Hoffman wrote:
> On Tue, 21 Oct 2003 03:13:30 -0400, "Robin G." <greenrd@...>
> Or do you mean "set" in a generic sense?
Well, as I read the CS use of graph, it pretty much means *any* group of data
with connected nodes, regardless of relationship or order. I'm leaning away
from "set" because of this, and more towards "structure."
> Also, if the word "graph" ends up in the spec, I suggest that the word
> "directed" appear directly in front of it (at least when it's first
> used) so people who aren't familiar with the computer science use of
> "graph" won't be misled. They may be confused, but at least they'll
> know why -- they don't know what a directed graph is. Google, for
> example, can help with this. :-)
In CS, you say "edge" where I am sure most programmers are already familiar
with the term "link" such as in a "linked list." A linked list is a graph,
and how the list is linked might cause it to be called any sort of graph, it
really depends; directed, complete, multi, etc. However, in practice, it's
just called a "linked list." Arrays are arrays, not a directed graph; hashes
are hashes, not simple graphs and so on.
Anyway, is it not legal YAML to just have one vertice, alone and unconnected
to anything? For example:
Isn't that legal YAML? A single vertice cannot be a graph, as I understand
the term. It must be paired with another. I just learned the CS definition,
so I could be wrong, but it seems this is the case.
I think "structure" is far more appropriate. For one thing, even if the above
*is* a graph, YAML refines the concept and I think it's too primitive a term.
For another, if you are familiar with C structures and how perl, ruby and
other programming languages can construct static data structures made up of
strings, hashes and arrays, you know how close YAML is to these data
structures. Lastly though, I think since XML has its own refinement of the
graph concept, and it's so different from YAML, that we shouldn't adopt their
use of the term. YAML is just so much more structured.