News for hackers. Stuff that matters.
Re:Python past, present, and future with Guido van Rossum [a... by sevensor on Thursday February 23, 2017 @08:29AM (#13713654)
> "x=x+1" must be especially confusing to high-school kids

I like immutability as much as the next programmer, probably more. But the idea that changing the value of a variable in memory is confusing to high-school kids gets repeated way too often with way too little evidence. X isn't the x from algebra, x is your bank account balance. That it changes at payday is not a hard analogy to understand. I have yet to meet the high-school kid who thinks this says that 1=0.

Now, like the rest of us, high-school kids can get tripped up by assignment and its consequences. Functional programming offers us great tools to deal with that. But the 1=0 argument is not credible to your average procedural programmer who's been doing assignment since the age of fourteen, and is in full command of basic algebra. A much better argument would be that Haskell lets you take advantage of algebra as an analogy, and Python doesn't unless you're unusually disciplined.

Edit: removed a word for grammar.

Re:Python past, present, and future with Guido van Rossum [a... by willtim on Thursday February 23, 2017 @08:53AM (#13713820)
I never said mutating a variable is confusing. I said repurposing the equality operator is potentially confusing, especially for children. Pascal used ":=" to mean assignment, long before Python existed.
Re:Python past, present, and future with Guido van Rossum [a... by dragonwriter on Thursday February 23, 2017 @09:04AM (#13713906)
BASIC used "=" for both assignment and equality tests long before Pascal existed and was more popular for teaching the youngest students even when Pascal was available, so I find the idea that the use of "=" for assignment is some kind of barrier that high school kids (or younger, even) are going to have a lot of problems with just as implausible as the idea that imperative mutation is such a problem.
Re:Python past, present, and future with Guido van Rossum [a... by willtim on Thursday February 23, 2017 @09:19AM (#13714010)
It was before my time, but ALGOL used ":=" long before BASIC existed. The point is that academics have repeatedly not used "=" for assignment for successive new languages over many decades. Clearly they care, even if you do not.
Re:Python past, present, and future with Guido van Rossum [a... by rwallace on Thursday February 23, 2017 @02:31PM (#13716934)
Well yes, it's clear that repurposing '=' for assignment confuses or at least annoys many academics, no disputing that. But your earlier claim was that it confuses children, which it certainly does not. (Source: it didn't bother me in the slightest when I was learning Basic at age 11, or any of the other children I talked to about it.)
Re:Python past, present, and future with Guido van Rossum [a... by willtim on Thursday February 23, 2017 @04:03PM (#13717766)
You have your personal annecdotes and I have my own. We will have to agree to disagree.