5/11/2026 at 5:04:44 AM
I remember dBASE IV from my childhood days when my father, who had no computer background, was required to take computer training by his workplace. My father and his colleagues were given free evening computer lessons by their company, taught by the same teachers who used to teach us, the kids, computers in our school.After their first class, he brought home a fat dBASE IV manual. Since I was very interested in computer books, I read a good portion of it even though I had never touched dBASE in my life. I would daydream of all the little forms, queries, reports and labels I could make with dBASE. But I never got to touch dBASE in my life. We kids used to get LOGO lessons instead in school.
One day my father came back from his evening lesson mildly distressed about something he had learnt. He said they were being taught loops but in the loop there was an equation that seemed just plain wrong. It was:
i = i + 1
How could that be a valid equation? How could i ever equal i + 1? He mentioned that he had asked the teacher about it and from what I could gather, my teacher and my father were talking past each other. The teacher probably tried explaining that it was not an equation but an instruction instead, whereas my father continued to interpret i = i + 1 as an equation due to the algebra he was so familiar with. It sort of held up the class for a while.The teacher asked my father's name, perhaps so that he could talk to him separately later. But when he learnt my father's name, he realised that his son, me, went to the same school where he taught. So he told my father, 'When you get back home, ask your son about i = i + 1. He will explain it to you better than I am able to.'
And indeed I was able to explain it to him pretty well. I was eight or nine years old back then. And that was probably the first thing I taught my father!
by susam
5/11/2026 at 11:15:07 AM
Perhaps this is why BASIC originally used LET in the form LET X = X + 1, to imply a calculation rather than equality.by hh2222
5/11/2026 at 2:03:50 PM
The = for assignment is FORTRAN’s fault. In the beginning there was no equality, just assignment, and FORTRAN (being just a FORmula TRANslator after all) made the somewhat dubious decision to use = for that (punch card space being sparse and symbols limited and all).When FORTRAN gained equality it went for .EQ. out of practicality and necessity. Many others followed suit but used the somewhat more pleasant == instead of .EQ..
But it didn’t have to happen that way. ALGOL decided to stick close to mathematical tradition:
= for equality
:= for assignment ("definition")
While x := x + 1 is still not clean mathematical notation, I think it wouldn’t have riled up OP’s father as much. If he’d squinted enough, he might even have been able to see little indices below the x’s there.
by weinzierl
5/11/2026 at 10:45:20 PM
> ALGOL decided to stick close to mathematical traditionAnd now we have all 3 in Python (=, ==, and :=) which makes me sad.
by selcuka
5/12/2026 at 8:26:02 AM
Splitting = and := in python is very intentional though, It makes writing bugs like this impossible: if is_logged_in=True:
allow_access()
I've got... opinions on the way python separates statements and expressions, but there's some real benefits to it too.
by Doxin
5/13/2026 at 1:57:32 AM
Splitting = and := is intentional, but not for the reason you stated. We could have used := for all assignments from the beginning: is_logged_in := True
or if is_logged_in := True:
I agree that this would require blurring the statement/expression distinction. You can still do that in a weird way, by disguising your assignment as an expression. This is valid: (is_logged_in := True)
The reason it was done that way because := was an afterthought, and making it the assignment operator would have introduced a breaking incompatibility. That lead to having 3 different symbols for 2 use cases (assignment and comparison).
by selcuka
5/11/2026 at 2:37:01 PM
A rumor I heard was that x := 4
was chosen because it looks similar to x ⇐ 4
by teddyh
5/13/2026 at 10:16:48 AM
In some of the draft versions of ASCII the positions currently taken by underscore and caret were left arrow and up arrow respectively. As late as 1985 I used terminals (LanparScope) the supported the older draft.by jdougan
5/13/2026 at 1:15:21 PM
All Commodore machines also uses the older ASCII standards, in addition to filling out the full 8 bit range with various graphics. It’s usually referred to as “PETSCII”, from the original Commodore “PET” series, but PETSCII was also used in the popular Commodore 64 (and 128) home computers.by teddyh
5/12/2026 at 12:15:01 PM
That is indeed the case in Smalltalk.The Xerox keyboards had the support for ⇐, with its workstation OSes being all graphical based.
When Smalltalk grew beyond Xerox PARC walls, ⇐ turned into :=
You can see this in the original Xerox PARC documents and books for Smalltalk.
by pjmlp
5/12/2026 at 6:02:39 AM
But why? := is perfectly understandable and established notation for definition. You don't get closer assignment without resorting to esoteric notation?by weinzierl
5/11/2026 at 3:31:44 PM
Why not <= then? I'd expect both < and = to be available.by badsectoracula
5/11/2026 at 5:00:40 PM
Probably because '<=' is very easily read as "less or equal"? (unless you are joking, of course)by tandr
5/11/2026 at 8:20:37 PM
I would preferx is 5
x is x + 5
by UltraSane
5/11/2026 at 10:41:52 PM
But x isn’t x + 5. If anything, it should be “x becomes x + 5”.by layer8
5/11/2026 at 11:39:26 PM
Ok. How aboutSet x to x + 5
by UltraSane
5/12/2026 at 7:37:03 PM
That’s pretty much COBOL syntax: https://www.ibm.com/docs/en/debug-for-zos/17.0.x?topic=comma...Except that COBOL doesn’t allow an arithmetic expression there, so you have to write
COMPUTE X = X + 5.
instead. ;)
by layer8
5/11/2026 at 8:19:48 PM
I would preferX is 5
X is x + 5
by UltraSane
5/11/2026 at 10:16:44 PM
How do you feel about ADD 5 TO X GIVING X?I kid, of course, but "X is x + 5" brings Prolog to mind with all the unification and bidirectionality that implies.
by thequux
5/11/2026 at 11:38:52 PM
> ADD 5 TO X GIVING XGrammatically, this would not change X. "...GIVING X" would just return X. Since it's part of the same statement, it seems it should ignore the "ADD 5 TO X" part.
Now, if you'd like to place the result into X, I suggest "ADD 5 TO X" would suffice as the entire statement.
by jagged-chisel
5/13/2026 at 1:54:35 AM
[dead]by jackzhuo
5/11/2026 at 11:21:33 AM
Think that was just to make the parser understand it was an assignment without having to do any lookahead. There was also possibly ambiguous stuff with equality and assingment as they both used =.by cryo32
5/11/2026 at 6:21:46 PM
As kids we had the same debate because we were taught algebra before BASIC, and naturally tried to interpret it mathematically. Fortunately, sometimes a kid can explain it better to other kids than an adult, and that was the case.by ASalazarMX
5/11/2026 at 5:12:49 AM
Some of my earliest programming exposure was a dBASE IV book my dad had for work, though it was some time before I put any of it into action. At that time I was reading manuals like fiction, only slowly realizing that I could actually use some of it with our computer.by hcs
5/11/2026 at 11:40:41 PM
I had the same problem. Sometime in 1982. at age 11, I started working through a BASIC book and an Apple II computer. I was perplexed: what is this? 10 X = X + 1
20 Y = Y - X
If the computer is meant to solve two equations here, why not start with an example that has solutions??!
by kazinator
5/11/2026 at 7:27:19 AM
It’s a pity your father’s perspective didn’t prevail. We’d all be using better programming languages now.by antonvs
5/11/2026 at 8:57:30 AM
It's a notational issue. IIRC Pascal used := for assignment and = for equality testing.Where this becomes extremely Rorsarch is the spectrum between "notation is absolutely critical: there is only one correct representation of programs in people's heads and we have to match that exactly" vs. "all program text is ultimately syntactic sugar and programmers will just adapt to whatever". History tells us that the C choice of = for assignment and == for equality testing won, but of course that's not a choice in a vacuum and it's tied up with a thousand other choices.
by pjc50
5/11/2026 at 11:42:14 PM
If you have no concept of destructive manipulation of variables, because all the variables you have ever known were the ones in math, you will still read := as equals.by kazinator
5/11/2026 at 9:54:32 AM
I think parent was alluding to mutability.by gpderetta
5/11/2026 at 5:14:37 PM
Yes! In lazy but immutable languages like Haskell, it is totally fine to refer to the value itself during definition. This is really the same idea that a recursive function can refer to itself during definition. It’s common to define a variable for the infinite list of prime numbers, where the definition requires the list of prime numbers itself. primes = 2 : sieve primes [3..]
sieve (p:ps) xs = let (h, t) = span (< p*p) xs in h ++ sieve ps (filter (\n -> rem n p > 0) t)
Here `primes` is a variable that refers to itself in its definition (called corecursion), and `sieve` is a recursive function.
by kccqzy
5/11/2026 at 10:54:51 AM
While I'm a big fan of immutable design, it makes some algorithms much more expensive and ultimately DRAM is mutable. And the example we're talking about could be a loop counter!by pjc50
5/11/2026 at 9:49:15 PM
A tail-recursive loop handles loops just fine, and is just as efficient. This is a perfect example of the misconceptions that mutable-first programming languages have caused.> ultimately DRAM is mutable
Ultimately the CPU executes machine code, but I don’t see you directly writing that. You’re cherry-picking to defend an indefensible position.
by antonvs
5/11/2026 at 11:34:19 PM
No parent should have to learn from their child about the abuses computer people have done to mathematical notation.by kajman
5/11/2026 at 2:15:17 PM
This tells a lot of about your dad - he must be an amazing person, so he was ready to learn something from his kid. Not everyone would be able to admit that 9 y.o. can teach him something :)by piokoch