IIRC Algol-68 (the lesser-known, more complicated version) used 'int x = 0;' to declare a constant and 'int x := 0;' to declare a variable. And there was a lot more to it; see https://en.wikipedia.org/wiki/ALGOL_68#mode:_Declarations. I'm guessing Go reversed this because they want '=' to be the common assignment (whereas in Algol-68 the common assignment was ':=').
My current thinking about Python is that if we're doing this, '=' and ':=' will mean the same thing but inside an expression you must use ':='. Chris, Nick and I are working out some details off-list.
On Mon, Apr 2, 2018 at 1:51 PM, Mike Miller email@example.com wrote:
Yes, I first came across := when learning (Turbo) Pascal in the early 90's.
However golang managed to screw it up—it only works there as a "short declaration AND assignment" operator. You can't use it twice on the same variable! Boggles the mind how experienced designers came up with that one. ;-) Maybe Algol did it that way? (before my time)
I found Pascal's syntax, := for assignment, = and <>, for tests about close to perfect in ease of learning/comprehension as it gets, from someone who studied math before C anyway.
On 2018-03-30 12:04, Nikolaus Rath wrote: _______________________________________________ Python-ideas mailing list Pythonfirstname.lastname@example.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/