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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c406e0c4a6eb74ed X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news-ham1.dfn.de!news.uni-hamburg.de!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: ADA Popularity Discussion Request Date: Fri, 27 Aug 2004 11:39:15 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <49dc98cf.0408110556.18ae7df@posting.google.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1093606755 29428 134.91.1.34 (27 Aug 2004 11:39:15 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Fri, 27 Aug 2004 11:39:15 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: g2news1.google.com comp.lang.ada:3081 Date: 2004-08-27T11:39:15+00:00 List-Id: Kevin Cline wrote: : But an experienced APL programmer would undoubtedly find the shorter : APL program easier to read. Though not all of them would agree that J programs are as easy to read. Conversly, if you know J's operators and functions by heart, and you read one of the 2-letter sequences in ML or Eiffel or Ada, overload resolution has to happen in you "reading apparatus". Why not try to avoid this when it makes sense to do so? : Concise mathematical notation makes it possible to reason : about mathematical objects at a high level. : So, instead of "limit(e->0) [f(x + e) - f(e)] / e", we write "f'(x)" Uhm, the left formula is, in a sense, the body of the spec on the right; they are *both* in concise mathematical notation. To me, the second is as much an abbreviation as "non-inlined subprogram calls". How many items of concise notation should there be per page, in a program of some size, given a set of programmers with different areas and depths of knowledge? At least there should be a "modularisation of notations". How can you achieve that when the language, not the modules, defineds or invites conciseness? : Relatively few programmers would be capable of writing the SPIRIT : parser library, but when that's what you need, Ada just won't get you : there. It does get me there, unless you are referring to writing an exact copy the SPIRIT parser based on Ada templates. But there is no need. If you need an EBNF like executable notation in Ada, SPITBOL patterns are at your service; they are readily available for Ada. It is not exactly the same thing as template computing, but it should turn out to be equally powerful. This is working code, the rules are copied from the example in the SPIRIT introduction: begin integer := span("0123456789"); group := '(' & (+expression) & ')'; -- "+" defers factor := integer or group; term := factor & arbno(('*' & factor) or ('/' & factor)); expression := term & arbno(('+' & term) or ('-' & term)); -- `input_text` is an Unbounded_String as per the above grammar. -- (which omits white space patterns.) match(input_text, group ** output, result); -- in addition to matching, displays, on `output`, what has been -- matched end expr; Ada will get me there, if along a slightly different path. :-) -- Georg