Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #2792
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end |
|---|---|
| From | gah4 <gah4@u.washington.edu> |
| Newsgroups | comp.compilers |
| Subject | Re: for or against equality, was Why are ambiguous grammars usually a bad idea? |
| Date | Mon, 3 Jan 2022 21:07:07 -0800 (PST) |
| Organization | Compilers Central |
| Lines | 34 |
| Sender | news@iecc.com |
| Approved | comp.compilers@iecc.com |
| Message-ID | <22-01-010@comp.compilers> (permalink) |
| References | <21-12-003@comp.compilers> <21-12-017@comp.compilers> <21-12-022@comp.compilers> <21-12-026@comp.compilers> <21-12-033@comp.compilers> <22-01-007@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="66195"; mail-complaints-to="abuse@iecc.com" |
| Keywords | syntax, comment |
| Posted-Date | 04 Jan 2022 13:15:39 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 | <22-01-007@comp.compilers> |
| Xref | csiph.com comp.compilers:2792 |
Show key headers only | View raw
On Monday, January 3, 2022 at 11:58:39 AM UTC-8, mac wrote: > > [Interesting take. In reality, of couse, BASIC borrowed that from Fortran. Algol > > used := for assignment, different from = for equality comparison. -John] > Indeed. > Unfortunately, assignment is probably the single most common operator. > The ASCII committee should have kept the left-arrow character instead of > replacing it with underscore. The assignment statement in BASIC, at least the ones I know, has an (optional) LET keyword, so it might say: 10 LET A=3 Most people leave it off, though. Is PL/I the only language that uses = for both assignment and the relational operator? Since expressions are not statements, it avoids the ambiguity that would otherwise occur. I believe some BASIC also use = for both. Underscore is a pretty useful character. The two ASCII characters that don't exist in EBCDIC are ^ and ~. Two EBCDIC characters that don't exist in ASCII are 𝇍 (cent) and ¬ (logical NOT sign). Conversion tables usually cross map those pairs. (PL/I, at least, uses ¬ and ¬= operators.) [In original Dartmouth BASIC the LET was mandatory, but it was a considerably smaller and fully compiled language than the later dialects. On the other hand, PL/I made a fetish of nothing being a reserved word, e.g. IF IF = THEN THEN ELSE = BEGIN; ELSE END = IF; -John]
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
Re: Why are ambiguous grammars usually a bad idea? Why are languages usually defined and implemented with ambiguous grammars? Kaz Kylheku <480-992-1380@kylheku.com> - 2021-12-29 18:48 +0000
Re: Why are ambiguous grammars usually a bad idea? Why are languages usually defined and implemented with ambiguous grammars? Jan Ziak <0xe2.0x9a.0x9b@gmail.com> - 2021-12-29 16:05 -0800
Re: Why are ambiguous grammars usually a bad idea? Why are languages usually defined and implemented with ambiguous grammars? Kaz Kylheku <480-992-1380@kylheku.com> - 2021-12-30 18:00 +0000
Re: Why are ambiguous grammars usually a bad idea? Why are languages usually defined and implemented with ambiguous grammars? Kaz Kylheku <480-992-1380@kylheku.com> - 2021-12-30 20:08 +0000
Re: Why are ambiguous grammars usually a bad idea? Why are languages usually defined and implemented with ambiguous grammars? gah4 <gah4@u.washington.edu> - 2021-12-29 18:41 -0800
Re: Why are ambiguous grammars usually a bad idea? Why are languages usually defined and implemented with ambiguous grammars? Kaz Kylheku <480-992-1380@kylheku.com> - 2021-12-30 18:14 +0000
Re: Why are ambiguous grammars usually a bad idea? Why are languages usually defined and implemented with ambiguous grammars? Jan Ziak <0xe2.0x9a.0x9b@gmail.com> - 2021-12-30 13:47 -0800
Re: What does = mean, was Why are ambiguous grammars usually a bad idea? Jan Ziak <0xe2.0x9a.0x9b@gmail.com> - 2021-12-30 17:10 -0800
Re: Why are ambiguous grammars usually a bad idea? Why are languages usually defined and implemented with ambiguous grammars? mac <acolvin@efunct.com> - 2022-01-03 19:51 +0000
Re: for or against equality, was Why are ambiguous grammars usually a bad idea? gah4 <gah4@u.washington.edu> - 2022-01-03 21:07 -0800
Re: for or against equality, was Why are ambiguous grammars usually a bad idea? Thomas Koenig <tkoenig@netcologne.de> - 2022-01-04 19:23 +0000
Re: for or against equality, was Why are ambiguous grammars usually a bad idea? gah4 <gah4@u.washington.edu> - 2022-01-04 13:26 -0800
Re: Why are ambiguous grammars usually a bad idea? Why are languages usually defined and implemented with ambiguous grammars? gah4 <gah4@u.washington.edu> - 2021-12-30 13:40 -0800
Re: why do people choose a language, was Why are ambiguous grammars usually a bad idea? Jan Ziak <0xe2.0x9a.0x9b@gmail.com> - 2021-12-30 20:19 -0800
csiph-web