Version française
Home     About     Download     Resources     Contact us    
Browse thread
Serialisation of PXP DTDs
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dario Teixeira <darioteixeira@y...>
Subject: Re: [Caml-list] Re: Serialisation of PXP DTDs
> I mean, as long as types are as simples are pairs we will
> probably write down the very same S-expression, but for more
> complex types you hand up having to choose how to encode them
> in S-expressions.  Such design choices can need to be changed
> in the future as more types will be supported.  I fail to see
> why the future-proofness of such choices
> should be better than that of bin-prot.

Hi,

Well, there's several types of "future-proofness".  If in the
far-future I was faced with the task of reverse-engineering
and deserialising a structure about whose contents I only had
a rough idea, then a human-readable text-format like that of S-expressions would simplify things enormously.  On a more
down-to-earth scenario, bear in mind that S-expressions offer
forward-compatibility as long as you are only adding to
a structure.

For example, suppose I have a type foobar_t with two
constructors:

type foobar_t = One | Two

If later on I add a third constructor "Three" to this type,
the deserialiser for the new version can still read S-expressions
written with the serialiser for the old version.

Cheers,
Dario Teixeira