Re: Data table text I/O package?
- From: "Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx>
- Date: Tue, 21 Jun 2005 12:42:03 +0200
On Tue, 21 Jun 2005 11:24:34 +0200, Georg Bauhaus wrote:
> Dmitry A. Kazakov wrote:
>
>> No, you just have to use different delimiters between and within the
>> fields.
>
> "You just have to... ". No, gosh, the space was _mistyped_,
> it wasn't intended. This goes for any typo irrespective of what
> delimiter you choose. Now any reasonable CSV has far less offerings for
> error correction facilities for typos like these than any reasonable
> XML. By definition. (And, yes, I know you can construct syntax errors
> in XML, too, if you think this is an argument ...)
>
> Is it the typical Ada programmer's attitude to promote self-documenting
> bracketing constructs only for program text, but never for data text?
See below. It is a table. It has bracketing: rows and columns. This form
existed for centuries before XML. Who would print tables of logarithms in
XML?
>> This is why in Ada parameters of a procedure call are separated by
>> commas rather than spaces.
>>
>> Though is it about what syntax would be the best? Or is it about how to
>> parse something in a defined syntax?
>
> HAving a "best syntax" requires a measure for syntax quality.
> If you measure what a syntax can do in a heterogenous project
> by applying your personal aesthetic preferences,
> or your reading habits, or your programming skills, I have nothing to say.
>
> If you care about robust data interchange in a "sloppy
> field", you employ standard tools to help you get the correct
> data.
That is a different problem for which I would use a well-defined binary
format instead of fancy 3.15. What is the *accuracy* of this value, huh?
>> Now consider a space between / and >:
>>
>> <Distance km='3.15'/ >
>>
>> XML adds here nothing, but a huge readability loss.
>
> Oh well... You mean
>
> Distance'(km => 3.15)
>
> can be read well, whereas
>
> Distance'( km => 3.15 )
>
> is a huger readability loss? Come on.
Distance isn't a record. At least it should not be visible as such. Neither
distance is a type. The closest Ada's equivalent would be
Distance => 3.15 km,
or
Distance := 3.15 km;
But, lack of readability is not in the ugly </> brackets. Tabulated data
are readable because they are tabulated. That is: the names, the types and
units are *factored* out to the table header, which allows the reader to
concentrate on the *values*. Thus a table looks as:
Distance [km] Temperature [°C] ...
3.15 29.0 ...
2.10 14.4 ...
This is readable.
To make difference more visible, consider bitmaps stored XML format. Would
you be able to recognize a person's face in it?
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.
- Follow-Ups:
- Re: Data table text I/O package?
- From: Georg Bauhaus
- Re: Data table text I/O package?
- References:
- Data table text I/O package?
- From: Jacob Sparre Andersen
- Re: Data table text I/O package?
- From: Preben Randhol
- Re: Data table text I/O package?
- From: Jacob Sparre Andersen
- Re: Data table text I/O package?
- From: Preben Randhol
- Re: Data table text I/O package?
- From: Jacob Sparre Andersen
- Re: Data table text I/O package?
- From: Randy Brukardt
- Re: Data table text I/O package?
- From: Jacob Sparre Andersen
- Re: Data table text I/O package?
- From: Marius Amado Alves
- Re: Data table text I/O package?
- From: Georg Bauhaus
- Re: Data table text I/O package?
- From: Dmitry A. Kazakov
- Re: Data table text I/O package?
- From: Georg Bauhaus
- Re: Data table text I/O package?
- From: Dmitry A. Kazakov
- Re: Data table text I/O package?
- From: Georg Bauhaus
- Re: Data table text I/O package?
- From: Dmitry A. Kazakov
- Re: Data table text I/O package?
- From: Georg Bauhaus
- Re: Data table text I/O package?
- From: Dmitry A. Kazakov
- Re: Data table text I/O package?
- From: Georg Bauhaus
- Data table text I/O package?
- Prev by Date: Re: Data table text I/O package?
- Next by Date: Re: Data table text I/O package?
- Previous by thread: Re: Data table text I/O package?
- Next by thread: Re: Data table text I/O package?
- Index(es):
Relevant Pages
|