> From: [email protected]
>
> I wonder if it's similar in the financial and medical industries, but
> with us the fixed record format is not the thing that's standardized but
> some binary format I've never seen, handling of which is the domain of a
> specialized company known as an "EDI Provider." Would it be cynical to
> think the standardization in these areas is driven as much by
> rent-seeking as by interoperability? Cause it sounds like a sweet
> deal. ...
I
didn't attend, and perhaps someone already made this point, but it
often seems to be lost in Perl and Perl-like communities
where sequential IO is considered the only kind of IO, and memory
allocation is hidden from the developer.
There are two generally significant "wins" for fixed-record formats.
1.
Static allocation. Records can be read without reallocating or wasting
memory. This is faster/better for obvious reasons. Many languages make
it possible to map a fixed structure over the memory used, so inner
elements can be accessed conveniently -- and unions make it possible to
access conditional content nicely.
2. Dynamic record access. When
data is stored on a filesystem, mmap/CreateFileMapping can be used to
map the record-data and offsets can index to an arbitrary record
directly.
There are many languages that can take advantage of these factors. Perl is bad
at both.
Using
a format like XML or JSON can be nice in other ways. But it's going to
be less efficient and it's going to require full parsing of an entire
document (barring exceptional exit of a streaming parse) and dynamic
allocation of memory.
There is no "better" choice -- only "better
for the situation". (But if you define the "situation" as "I want to
use Perl", then you're starting with a narrow viewpoint.)
As for "standards"... There's no such thing. Performance is real -- standards
are just agendas. If you want to talk to X, then you'll speak what X speaks.
Period. You can tell X that "French is the language of diplomacy" or "XML is
the language of the future", but when X ignores your XML & French, you can
either speak what X wants, or not talk to X. Standards are just what the
powerful call their own preferences.
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm