Path: csiph.com!1.us.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: gah4 Newsgroups: comp.compilers Subject: Re: What attributes of a programming language simplify its use? Date: Fri, 2 Dec 2022 02:09:52 -0800 (PST) Organization: Compilers Central Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-12-002@comp.compilers> References: <22-12-001@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="4781"; mail-complaints-to="abuse@iecc.com" Keywords: design, history Posted-Date: 02 Dec 2022 11:50:25 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: <22-12-001@comp.compilers> Xref: csiph.com comp.compilers:3249 On Thursday, December 1, 2022 at 4:18:24 PM UTC-8, gah4 wrote: (snip) > One feature that I find makes them easier to use, and harder to implement, is no reserved words. (snip) > [I take your point, but in PL/I you can say: > > IF THEN = ELSE THEN BEGIN = IF; ELSE END = IF; > > COBOL famously has too many reserved words but PL/I overreacted. -John] COBOL had many useful English words used. As well as I know it, the idea for PL/I was that you shouldn't need to know about the parts of the language that you weren't using, even know the words. But also, PL/I more than other languages has simple rules, instead of arbitrary restrictions. You can use any expression in any place where an expression is allowed. Fortran has always, and still does, have unobvious restrictions on how expressions can be used. Some it seems intentionally to make it harder for the programmer. That is, to discourage practices that some don't like. My favorite complaint is about using REAL variables in DO loops. Yes there are good reasons not to do it, but it isn't up to the language to decide that. The actual reason I follow this one, is that many (many!) years ago I would sometimes translate BASIC programs to Fortran, where all variables are Fortran REAL. PL/I allowed array expressions from the beginning, Fortran added them much later. PL/I has a simple rule. The subscripts have the same value for all arrays in the expression. Fortran has complicated rules, where some arrays index from one, even if they are declared with different lower bound. You have to be extremely careful, which one it is using. And it gets even worse when you pass arrays to subroutines. But back to the reserved words. Just because it allows them, doesn't mean that you should use them. In all cases, the person writing the program should consider readability. And using IF related words in an IF statement is bound to be confusing.