[Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)
On Mon, 2 Jul 2018 10:25:42 +1000
Steven D'Aprano <steve at pearwood.info> wrote:
> How do people who teach other languages deal with this?
> Assignment expressions are hardly a new-fangled innovation of Python's.
> pretty much the entire C family (C, C++, C# at least).
Those other languages don't have two different assignment operators,
AFAIK. That's the main point of complication PEP 572 introduces, not
the fact that assignment can now be used in an expression.
> Admittedly R has the advantage that they don't have to teach a distinct
> assignment syntax and explain *why* it ought to be distinct. But
> countering that, they have *four* different ways of doing assignment.
I don't think R is easy to understand. It depends on the demographics.
For a software engineer like me, it's pretty hard to wrap my head around
R's nonsense. I think R is only easy if you accept to use it in a
"tinker aimlessly until my code works" manner.