From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Languages don't matter. A mathematical refutation Date: Fri, 3 Apr 2015 21:34:15 +0200 Organization: cbb software GmbH Message-ID: References: <87h9t95cly.fsf@jester.gateway.sonic.net> <04f0759d-0377-4408-a141-6ad178f055ed@googlegroups.com> <871tk1z62n.fsf@theworld.com> <87oan56rpn.fsf@jester.gateway.sonic.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: w2sqUGEBZqsVBYNL7Ky3Kg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:25404 Date: 2015-04-03T21:34:15+02:00 List-Id: On Fri, 03 Apr 2015 10:34:44 -0700, Paul Rubin wrote: > "Dmitry A. Kazakov" writes: >> I would say that is a domain-specific language. Remoteness from the machine >> code does necessarily imply higher level. To me SQL or OpenGL are lower >> level than C, though both are farther away from the machine and closer to >> some domains. I think being higher level is related to the abstraction >> capabilities. > > I thought of low level = programmer chooses the algorithms, high level = > computer chooses them. That would be imperative vs. declarative. > So SQL is very high level (programmer writes a > select or join and the database figures out the query plan, and in some > cases the db might notice repeated queries and decide to add indexes all > by itself). SQL is low level in my view, because it does not support basic programming abstractions, e.g. abstract data types. > http://prog21.dadgum.com/166.html claims that C's highest > level feature is the switch statement, since it analyzes the set of > cases and might generate a linear sequence of comparisons, a jump table, > or a tree-like search. The other C statements mostly generate > straightforward sequences of machine instructions modulo things like > register allocation. I don't buy the idea of closeness to the hardware. It would mean that the language level would depend on the target machine. E.g. Lisp would be high on x86 and low on a Lisp-machine. > I saw another paper proposing that the dividing line between low and > high level languages is that the high level ones have garbage > collection. Native support for any feature is not automatically high level. You could have assembler with linear algebra matrix operations. It would be still assembler. Exactly like SQL is low level, because relational algebra is no better than MOV, ADD, MUL, CMP algebra of a traditional assembler. In fact it is worse, because it is not Turing-complete. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de