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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable 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!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Build language with weak typing, then add scaffolding later to strengthen it? Date: Thu, 28 May 2015 18:39:20 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <127b004d-2163-477b-9209-49d30d2da5e1@googlegroups.com> <59a4ee45-23fb-4b0e-905c-cc16ce46b5f6@googlegroups.com> <46b2dce1-2a1c-455d-b041-3a9d217e2c3f@googlegroups.com> <3277d769-6503-4c7f-885f-3a730762b620@googlegroups.com> <9fa68fb7-89f0-42b3-8f25-20e70cb34d63@googlegroups.com> <87egm3u662.fsf@adaheads.sparre-andersen.dk> <20c56bea-2803-4aa9-a626-2d25e480df20@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1432856361 19142 24.196.82.226 (28 May 2015 23:39:21 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 28 May 2015 23:39:21 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:26044 Date: 2015-05-28T18:39:20-05:00 List-Id: wrote in message news:20c56bea-2803-4aa9-a626-2d25e480df20@googlegroups.com... ... >Now Ada has grown with the crowd. >Ada95's syntax volume stands at roughly 3000 lexemes on par with C#. >C++ is slightly less at 2500 or so. > >The old man (working in Georg's garage :) found scientific reason to follow >the 'reduced >instruction set' trend, that was and still is, popular in hardware CPU >design. And came >up with Oberon, with stands at 700 lexemes. Other people mentioned it, but the number of pages is a horrible measure. Ada's standard was designed to be readable by actual programmers, thus it uses lots of extra descriptive text, shows lots of examples, and has lots of space-wasting internal headers. And, the Oberon standards contain no runtime library, that's a huge part of the Ada Standard. We've also got lots of reference indexes which are intended to make it easier to find things. So looking at the current Ada 2012+TC1 document: Total: 951 pages (PDF). Non-normative indexes, summarys, and tables: (Annex K-Q [106 pages], Table of Contents [10 pages], Index [53 pages]) [169 pages] ISO mandated boilerplate, acknowledgements, other useless cruft: 16 pages. Description of how the standard is organized (Chapter 1): 8 pages. Clauses totally devoted to examples: 9.11 (3 pages); 12.8 (2 pages); 11.4.3 (1 page); 13.11.6 (3 pages). [9 pages] Libraries included in the core description (half of 3.9 - 2 pages; most of 9.6, 9.6.1 - 8 pages; most of 13.11, 13.11.4, 13.11.5 - 5 pages). The core library (Annex A): 227 pages. Interfacing to foreign languages (mostly libraries): 28 pages. Specialized needs annexes (these are optional - Annex C-H): 138 pages. Obsolete stuff (Annex J): 14 pages. That leaves the actual language definition at 337 pages. To be fair, one could eliminate stuff not even contemplated by Oberon - tasks (Chapter 9, 40 pages), generics (Chapter 12, 18 pages not including the example removed earlier), and low-level programming (Chapter 13, 51 pages excluding the example removed earlier). So now we're at 228 pages. With some reformatting, and removing all of the introductory text, notes, and examples, we'd save at least 20% of that (probably more). So that means that an equivalently formatted Ada standard would probably be roughly 180 pages (or maybe 270 if we left everything in). Surely I could get the core of the Standard into 17 pages if I reformatted it enough (you'd probably need a magnifying glass to read it, though). Meaning that the number of pages doesn't mean much. Is that bloat? Dunno. It's certainly a lot of extra precision in describing things, making code following the standard more likely to be portable. Hardly any programming languages describe the process of elaboration, or carefully define how finalization happens, including in weird corner cases that aren't likely to actually happen. And so on. Assuming that your description of the syntax is accurate, the Oberon manual is clearly leaving out vast amounts of needed detail. (And no, you can't look at source of a compiler to "augment" a language standard!). The Ada syntax alone takes up 21 pages in the Ada standard. That means that the Oberon syntax should take up 21/3000*700 = 4.9 pages of text. That leaves precious little space to describe the visibility rules for packages (to take one nasty example). And, of course, Wirth himself has a long history of writing sloppy language standards and leaving when other people try to clean them up (Algol-W, Pascal, Modula, Modula 2, ...). He's a brilliant language designer, but he always has underdescribed standards. (That surely includes building standards without any library description, which is nonsense for any purpose.) Summary: standard page counts are meaningless. One can change them wildly by removing non-normative stuff, by reformatting, by leaving out the libraries that every programmer will need, and other stuff that has nothing whatsoever to do with content. Randy Brukardt, ARG Editor.