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 course, BASIC borrowed that from Fortran. Algol used := for assignment, different from = for equality comparison. -John]
On 2021-12-16, Roger L Costello
Question: Opine about why languages are usually defined and implemented with
ambiguous grammars.
Novice programmers have historically been attracted to cryptic-looking languages. It is one of the main reasons for the success of languages
like C and Perl.
....
[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.
[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;
[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]
Stories are that COBOL programmers always
keep the list of reserved words nearby, to avoid using them.
[COBOL doesn't have that many reserved words
Using a language that you don't know in its entirety might seem
dangerous, but everybody seems to do it these days:
how many C programmers have read the entire 500+ pages of
the latest C standard and memorised the 200+ varieties
of "undefined behaviour" so that they can avoid all of them
in every line of code that they write?
On 05/01/2022 11:25, Martin Ward wrote:
Your tools should tell you if you are accidentally using a reserved word as an
identifier.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 233:52:45 |
Calls: | 6,624 |
Files: | 12,172 |
Messages: | 5,319,635 |