Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.misty.com!news.iecc.com!.POSTED!nerds-end From: "Gerry Rzeppa" Newsgroups: comp.compilers Subject: Re: language design models, was Writing A Plain English Compiler Date: Mon, 10 Nov 2014 03:29:43 -0600 Organization: Compilers Central Lines: 38 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-11-022@comp.compilers> References: <14-11-004@comp.compilers> <14-11-005@comp.compilers> <14-11-012@comp.compilers> <14-11-018@comp.compilers> <14-11-021@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: miucha.iecc.com 1415653132 46193 2001:470:1f07:1126:0:676f:7373:6970 (10 Nov 2014 20:58:52 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Mon, 10 Nov 2014 20:58:52 +0000 (UTC) Keywords: syntax, design Posted-Date: 10 Nov 2014 15:58:52 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:1430 George says, English in particular has slippery pronouns: the "royal" "we" is singular; "you", "they" and "it" all may be singular or plural depending on context. [The plural use of "it" is rare in polite conversation, but is relatively common in exasperation and vulgarity: e.g., "Screw it!" may be a multiple reference.] Gerry replies: Which is one of the reasons we adopted the "language design model" that we did. We knew that experts in linguistics understood such subtleties; but we also knew that most of the people who speak English don't -- and yet they somehow get by. So, instead of trying to "understand" imperative sentences, we simply attempt to MATCH them with routines defined elsewhere -- because this appears to be what happens in many cases when we ask questions of, or give commands to, our wives, our children, and even our dogs. Say, "Want a treat little buddy?" and a baby (or a dog) may hear only "blah, blah, TREAT, blah, blah" -- but will nevertheless respond appropriately. Why? Because the word "treat" is associated with some kind of previously-recorded mental picture or concept. Say, "Where has that mother of yours gone?" and the subject may only hear, "WHERE blah blah MOTHER blah blah blah" -- but will again respond appropriately, because a "where" routine with a "mother"-compatible parameter has been previously defined and can be called and executed. Our compiler takes the same approach: we let the programmer define his own routine headers -- using his own vocabulary, spelling, good or bad grammar, etc -- and then we select the "best match" for his imperative sentences from those. Now one might think that such a sloppy approach would result in an difficult and unpredictable system: but the fact of the matter (and we speak from actual experience here) is that it results in a system that is both convenient and reliable.