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: Sat, 4 Apr 2015 08:59:01 +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> <87k2xt6l1b.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:25413 Date: 2015-04-04T08:59:01+02:00 List-Id: On Fri, 03 Apr 2015 12:58:56 -0700, Paul Rubin wrote: > "Dmitry A. Kazakov" writes: >> SQL is low level in my view, because it does not support basic programming >> abstractions, e.g. abstract data types. > > Is Lisp also low level in your view then? Classic Lisp definitely is. >>> http://prog21.dadgum.com/166.html claims that C's highest >>> level feature is the switch statement, >> 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. > > It's not about closeness to the hardware, it's about algorithms. > Searching for a value by iterating through a list of them might use > different instructions on x86 vs Lisp machine, but it's the same > algorithm on both. No. There is no any algorithm when iterating is an atomic operation of the language. And it is irrelevant what actions the hardware takes in order to implement it, pushing electrons is not the language business. Consider an analogue computer. It has hardware operations like solving differential equations. What algorithm? None. > But doing a binary search on the list is a different > algorithm. Yes and does not affect the level. > And would you consider C's switch statement to be > declarative rather than imperative? It depends on the beholder. Your perception tells you if it were declarative or imperative, there is no other difference. Reading the source code you translate and interpret it into your brain. Anything that rings as immediate action is marked as "imperative". > It could generate a linear search > or a binary search depending on what it decides will be faster code. That is irrelevant. > But most of us think of C as imprative. > >>> [paper proposing that HLL's are those with 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. > > GC is not like matrix operations. It's not a library that you call. It > pervades the operation of your entire program. So is the floating-point unit on x86. You must save registers and restore them when doing some unrelated operations. Does it make floating-point multiplication high-level? > There's no universal definition of an HLL and I thought the GC > suggestion was interesting, though I'm not fully bought into it at the > moment. In my view GC is neither low nor high level. But the language abstractions required to describe GC in the language terms would be probably high level (if the language has an elaborated type system). So GC does not make C# high level, though C# is. It only makes it bad language, because GC is a bad idea. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de