Path: csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: gah4@u.washington.edu Newsgroups: comp.compilers Subject: Re: At what point is a language so abstract that it simply cannot be compiled? Date: Thu, 27 Feb 2020 18:27:04 -0800 (PST) Organization: Compilers Central Lines: 33 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <20-02-026@comp.compilers> References: <19-05-083@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="46931"; mail-complaints-to="abuse@iecc.com" Keywords: design, question Posted-Date: 27 Feb 2020 22:03:56 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <19-05-083@comp.compilers> Xref: csiph.com comp.compilers:2464 On Monday, May 13, 2019 at 8:17:54 AM UTC-7, Costello, Roger L. wrote: (snip) > This makes me wonder: Is a theoretical limit to the level of abstraction that > can be turned into machine instructions? Are there languages (abstractions) > that are so high level, so abstract, that they simply cannot be mapped to the > required set of addition, subtraction, comparison, branching instructions? Or > is there no limit to the languages/abstractions that can be compiled? For most languages, there is some back and forth between language design and compiler design, to be sure that the language is parsable. Though there is the complication that when new features are added to an existing language, for a new release of the standard, to be sure that existing programs are still valid and have the same meaning. It is possible, for example, to (mis)design a language such that the parsing is ambiguous. Having two different mappings to the underlying hardware is just about as bad as zero. Of the languages that I know about, PL/I is one of the few where pretty much the whole language was designed and specified before compiler(s) were written. Some parts might have turned out harder to compile than might have been expected. But note that if a compiler can't figure it out, likely it is even harder for a human to understand. Some of the early languages might have been designed to be easy to compile, but for many years now, compilability is second to the ability of humans to understand and reliably write programs in a language. Then some legal language constructs are recommended against, as they can confuse readers later, though likely not compilers.