News for hackers. Stuff that matters.
Re:Why Does “=” Mean Assignment? by AnimalMuppet on Tuesday April 10, 2018 @03:57PM (#16804695)
Traditionally? I don't think there was a "tradition". ":=" was used in Algol. "=" was used in Fortran. COBOL didn't use either "=" or ":=".
Re:Why Does “=” Mean Assignment? by Retric on Tuesday April 10, 2018 @04:30PM (#16805012)
FORTRAN was far from the first high level language.

Plankalkül for example was out a decade earlier and used →. EX:

  P1 max3 (V0[:8.0],V1[:8.0],V2[:8.0]) → R0[:8.0]
https://en.wikipedia.org/wiki/Plankalk%C3%BCl

So, there really was a lot of languages out there, but := was fairly common because it was easy to parse and type.

Re:Why Does “=” Mean Assignment? by jandrese on Tuesday April 10, 2018 @04:57PM (#16805336)
Plankalkül had the advantage of not having to run on a real machine.

As far as := is concerned having to use the shift key for an assignment is less than ideal but there really aren't any better options on a modern keyboard. I think C's use of = is a bit braindamaged but it is nice and quick to type.

Re:Why Does “=” Mean Assignment? by aap_ on Wednesday April 11, 2018 @03:53AM (#16808938)
On an ASR33 = is the character you have press shift for. : is unshifted.
Re:Why Does “=” Mean Assignment? by kps on Wednesday April 11, 2018 @10:39AM (#16811493)
Many early video terminals and microcomputers had similar layouts, because they were easy to implement. https://en.wikipedia.org/wiki/Bit-paired_keyboard
Re:Why Does “=” Mean Assignment? by roywiggins on Tuesday April 10, 2018 @06:46PM (#16806306)
It didn't actually contribute much to the evolution of other languages though, right? Had anyone even heard of it when Fortran/ALGOL/etc were being designed?
Re:Why Does “=” Mean Assignment? by 80386 on Wednesday April 11, 2018 @02:52AM (#16808674)
Zuse seems to have been under the impression that some of the ALGOL designers were aware of it: https://books.google.com/books?id=AsvSBQAAQBAJ&pg=PA522&lpg=...

Rutishauser was, at least.

Re:Why Does “=” Mean Assignment? by dragonwriter on Tuesday April 10, 2018 @04:54PM (#16805284)
> "=" was used in Fortran.

And most BASICs, though some (most?) required the keyword LET to introduce an assignment, as well.

Re:Why Does “=” Mean Assignment? by raverbashing on Tuesday April 10, 2018 @05:09PM (#16805452)
Let became optional quickly it seems

But most BASIC versions would accept 'let a = 1'

Personally, I don't see why the big fuss. If your assignment and comparison operators are the same the only thing you lose is doing x = (y == 2); kind of expressions (since you would disambiguate from conditional expressions).

Now, assignments are done more frequently than comparisons, hence why it makes sense for it to be the simpler/shorter one.

Re:Why Does “=” Mean Assignment? by boomlinde on Wednesday April 11, 2018 @03:58AM (#16808955)
You wouldn't even lose that if you can accept that assignments can't be expressions, which seems like a bit less of a loss.
Re:Why Does “=” Mean Assignment? by kbp on Tuesday April 10, 2018 @06:03PM (#16805950)
> And most BASICs, though some (most?) required the keyword LET to introduce an assignment, as well.

LET was virtually always optional; an expression by itself on a line (like 'X <> 10') is a syntax error anyway, so removing LET doesn't introduce any ambiguity.

Re:Why Does “=” Mean Assignment? by Certhas on Tuesday April 10, 2018 @04:04PM (#16804775)
From the article:

> Looking at this as a whole, = was never “the natural choice” the assignment operator. Pretty much everybody used := for assignment instead, possibly because = was so associated with equality. Nowadays most languages use = entirely because C uses it, and we can trace C using it to CPL being such a clusterfuck.

Re:Why Does “=” Mean Assignment? by AnimalMuppet on Tuesday April 10, 2018 @04:12PM (#16804850)
And I dispute the "pretty much everybody used" part. In fact, I think the article contradicts that opinion. Algol used it, and so did Pascal. But Pascal was only a year old [Edit: at the time the choice was made for C] - it [Pascal] hadn't set the world on fire yet (to the degree that ever did). That leaves Algol using ":=", and FORTRAN, COBOL, and Lisp not using it. That's not "pretty much everybody used".
Re:Why Does “=” Mean Assignment? by hwayne on Tuesday April 10, 2018 @04:26PM (#16804976)
Yeah, it's probably more accurate to say that "everybody from the Algol line used := for assignment", with C being the first language of that line to stop.
Re:Why Does “=” Mean Assignment? by kps on Tuesday April 10, 2018 @05:43PM (#16805774)
> From the article:

Articles, like desserts, aren't always right. I am sorely tempted to pull out Sammet's book tonight and start counting.

Re:Why Does “=” Mean Assignment? by kps on Tuesday April 10, 2018 @10:43PM (#16807631)
Too late to edit, but I've gone and done it: scanned through Sammet's Programming Languages: History and Fundamentals for languages with identifiable assignment statements. I skip assembly-style, English-like (COBOL etc.), and functional-style (LISP etc.) syntax, and for summary purposes ignore accompanying keywords like BASIC's LET.

Results:

ν = ε     18 (AMTRAN, BASIC, COLASL, CPS, FORTRAN, FORTRANSIT, JOSS, JOVIAL, Klerer-May, Laning & Zierler, MAD, MADCAP, MAP, MATH-MATIC, MIRFAC, PL/I, QUICKTRAN, UNICODE)

ν ← ε     4 (APL, DIALOG, IT, LISP2)

ε → ν     2 (MADCAP, NELIAC)

ν := ε     1 (ALGOL)

ε * ν     1 (BACIAC)

So pretty much everybody used ‘=’. ALGOL was an outlier, though admittedly more influential than BACIAC.