Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: gah4 Newsgroups: comp.compilers Subject: syntax complexity Date: Wed, 15 Feb 2023 15:08:12 -0800 (PST) Organization: Compilers Central Sender: johnl@iecc.com Approved: comp.compilers@iecc.com Message-ID: <23-02-045@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="31883"; mail-complaints-to="abuse@iecc.com" Keywords: syntax Posted-Date: 15 Feb 2023 19:32:41 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:3385 I started this in another thread, but I think it deserves its own. The question is, how does one measure syntax complexity, with the specific case of Fortran vs. PL/I. (And ignoring syntax vs. semantics, for now.) Even back to the 1970's, I always found that Fortran had strange and (seemingly) arbitrary rules on its syntax. Some of them made sense on the small, early, computers, but didn't go away later. Even worse, as new features were added, and some of the rules were relaxed, new ones appeared. On the other hand, PL/I from the beginning had more general rules. And, it seems to me, more general rules lead to simpler syntax. That is especially true for expressions, where PL/I allows pretty much the same expression syntax everywhere it allows expressions. PL/I had internal procedures from the beginning, though only added to Fortran much later. But when they were, Fortran didn't allow them to be nested. Only one level deep! That might have changed more recently, or maybe now two levels. One complication I see, is that syntax complexity as seen by people, might be different from it as seen by programs.