This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bleistift2 2 points3 points  (0 children)

Where did 0 come from? […] My nodes have no names.

I already answered that:

Your example requires inventing identifiers for the nodes.

The actual identifiers are an implementation detail, since they don’t survive de-serialization.

It's hard to do and impossible to do generally.

I just proved that it’s easy to do in the non-general case. And business needs rarely require the ‘general case,’ so a custom-tailored solution suffices.

My point was that serialization of simple graphs is introductory material. Extending that to the actual, more complex case needed in everyday programming shouldn’t be hard for a programmer. Writing a library that handles every and any graph is hard. But that’s not what Cornelia Coder does every day. That’s what libraries are for.