Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Jan Ziak <0xe2.0x9a.0x9b@gmail.com> Newsgroups: comp.compilers Subject: Re: Why are ambiguous grammars usually a bad idea? Why are languages usually defined and implemented with ambiguous grammars? Date: Thu, 30 Dec 2021 13:47:36 -0800 (PST) Organization: Compilers Central Lines: 24 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <21-12-033@comp.compilers> References: <21-12-003@comp.compilers> <21-12-017@comp.compilers> <21-12-022@comp.compilers> <21-12-026@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="13670"; mail-complaints-to="abuse@iecc.com" Keywords: parse, history Posted-Date: 30 Dec 2021 18:45:53 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <21-12-026@comp.compilers> Xref: csiph.com comp.compilers:2782 On Thursday, December 30, 2021 at 7:56:15 PM UTC+1, Kaz Kylheku wrote: > When I started programming from nothing, I saw BASIC examples in a > book which was doing things like: > > 10 X = 2 > 20 X = X + 1 > > The only language with formulas that I was coming from was math. > > So, I thought, what? How can X be equal to X + 1; you cannot solve > this absurdity! > > From then I knew that the people who program computers to understand > symbols are free thinkers who make them mean anything they want. "X = X + Y" means "X[t+1] = X[t] + Y[t]" where t is time. Time had to be omitted from the notation of the BASIC programming language because otherwise the source code would consume a much larger amount of computer memory and it would complicate GOTO and FOR/NEXT statements. -atom [Interesting take. In reality, of couse, BASIC borrowed that from Fortran. Algol used := for assignment, different from = for equality comparison. -John]