From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Jason Dusek <jason(dot)dusek(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Imperative Query Languages |
Date: | 2017-07-05 14:02:19 |
Message-ID: | CAHyXU0wPPgYTWBvbeD4FCdyPtQeUnidfV1Nm4sb2fbnhp=GmdQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Jul 5, 2017 at 12:22 AM, Jason Dusek <jason(dot)dusek(at)gmail(dot)com> wrote:
> Hi All,
>
> This more of a general interest than specifically Postgres question. Are
> there any “semi-imperative” query languages that have been tried in the
> past? I’m imagining a language where something like this:
huh. Somewhat snarky answer, all of them? :-). Most languages are
imperative including just about all the ones that are popular in "the
enterprise" (minus SQL). You can for example code that looks
remarkably like that in pl/pgsql. Since postgres is a SQL server, it
would have to get compiled down to boring SQL statements but it's
generally understood (at least by me) that this is an inefficient way
to write code.
Downthread, Tom mentions CODASYL, etc, but could have mentioned the
big daddy, ISAM, and all it's various flavors. Virtually all business
code was written using it (and much of it still is) leading into the
SQL era. Code generally looked exactly like your example, except it
was much more stupid looking being written in (generally) COBOL, and
added in error handling, which is where the technique tends to break
down. SQL came about because some particularly smart people realized
that programmers were writing the same boiler plate code over and over
again and that perhaps access to data could be generalized and focused
down to the real problem being solved. This fortunately came about
before "enterprise developers" and "enterprise tool vendors" were as
organized as they are today and so was able to germinate into
something incredibly useful...
This revolution in programming was IMNSHO the single greatest
innovation in computer science; so much so that legions of the
unenlightened have been tirelessly working (hibernate) to eliminate or
displace its benefits, without much success:
http://www.codingdojo.com/blog/9-most-in-demand-programming-languages-of-2016/
:-D
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Travers | 2017-07-05 14:09:21 | Re: Strange case of database bloat |
Previous Message | Michael Paquier | 2017-07-05 13:57:16 | Re: pg_start/stop_backup non-exclusive scripts to snapshot |