Why are String Formatted Queries Considered So Magical?

Carl Banks pavlovevidence at gmail.com
Sun Jun 27 22:35:05 EDT 2010


On Jun 27, 4:35 pm, Ben Finney <ben+pyt... at benfinney.id.au> wrote:
> Carl Banks <pavlovevide... at gmail.com> writes:
> > Seriously, almost every other kind of library uses a binary API.
>
> Except for the huge number that deal with text protocols or languages.

No, not really.  Almost all types of libraries have binary APIs,
including those that deal with text protocols or language.  Any
control with string commands is something that's built on top of the
binary API.  And culturally, programmers interfacing those libraries
expect to and are expected to use the binary API for low-level
programming.

RDBs, as a whole, either don't have binary APIs or they have them but
no one really uses them.


> > What makes databases so special that they need a string-command based
> > API?
>
> Because SQL is a text language.

Circular logic.  I'm disappointed, usually when you sit on your
reinforced soapbox and pretense the air of infinite expertise you at
least use reasonable logic.

Also, I was asking about databases.  "SQL is a text language" is not
the answer to the question "Why do RDBs use string commands instead of
binary APIs"?


Carl Banks



More information about the Python-list mailing list