Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!nerds-end From: "Dmitry A. Kazakov" Newsgroups: comp.compilers Subject: Re: Have we reached the asymptotic plateau of innovation in programming language design? Date: Thu, 22 Mar 2012 21:17:55 +0100 Organization: cbb software GmbH Lines: 36 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <12-03-050@comp.compilers> References: <12-03-012@comp.compilers> <12-03-013@comp.compilers> <12-03-038@comp.compilers> <12-03-046@comp.compilers> <12-03-049@comp.compilers> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1332540836 88237 64.57.183.58 (23 Mar 2012 22:13:56 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Fri, 23 Mar 2012 22:13:56 +0000 (UTC) Keywords: design, syntax, history Posted-Date: 23 Mar 2012 18:13:56 EDT 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:517 On Wed, 21 Mar 2012 11:53:35 +0100, Torben Fgidius Mogensen wrote: > That is a > fairly neat idea, and by allowing all combinations of characters from a > subset of the non-alphanumeric characters in operator names, you also > avoid C's problem of parsing +++: It is parsed as a single operator, and > if it is not defined in the program, that is reported as an error. A better approach is restricted association rules requiring explicit brackets when some operands are shared by some operators. Typically it is the cases like: A and B or C -x^y etc. This method will work here as well. Provided, there are 1. infix + 2. prefix ++ 3. postfix ++ The rule would be that 1 cannot be associated with either 2 or 3. This would make both interpretations illegal: a ++ + b (a is shared by 3 and 1) a + ++ b (b is shared by 1 and 2) So the programmer would have to use brackets to disambiguate: (a++) + b a + (++ b) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de