<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Sun, Jul 1, 2018 at 5:28 PM Steven D'Aprano <<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, Jul 01, 2018 at 08:35:08AM -0700, Michael Selik wrote:<br>
> On Sun, Jul 1, 2018 at 12:39 AM Tim Peters <<a href="mailto:tim.peters@gmail.com" target="_blank">tim.peters@gmail.com</a>> wrote:<br>
> <br>
> > So, ya, when someone claims [assignment expressions will] make Python<br>
> > significantly harder to teach, I'm skeptical of that claim.<br>
> ><br>
> <br>
> I don't believe anyone is making that claim. My worry is that assignment<br>
> expressions will add about 15 to 20 minutes to my class and a slight<br>
> discomfort.<br>
<br>
How do people who teach other languages deal with this?<br></blockquote><div><br></div><div>Python may be in a unique situation in the history of programming. It wouldn't surprise me if more people learned Python last year than any other programming language.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Assignment expressions are hardly a new-fangled innovation of Python's. <br>
They're used in Java, Javascript, Ruby, Julia, R, PHP and of course <br>
pretty much the entire C family (C, C++, C# at least). What do <br>
teachers of those languages do?<br></blockquote><div><br></div><div>Assignment expressions are not the issue. The real question is: How do open-source projects balance the addition of new features against the growth of complexity? It's the same as that "Remember the Vasa" thread.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">[...] R [has] *four* different ways of doing assignment.<br></blockquote><div><br></div><div>I think that's a good explanation of why I teach Python and not R. The first time someone asked me to teach a data science course, Python wasn't the clear winner. In fact, R may have been more popular among statisticians. I picked Python for the same reason it's more popular in the industry -- it's the easiest* to use.</div><div><br></div><div>* Easiest that gets the job done well.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> As Mark and Chris said (quoting Mark below), this is just one straw in the<br>
> struggle against piling too many things on the haystack. Unlike some<br>
> changes to the language, this change of such general use that it won't be<br>
> an optional topic. Once widely used, it ain't optional.<br>
<br>
Without knowing the details of your course, and who they are aimed at, <br>
we cannot possibly judge this comment.</blockquote><div><br></div><div>I disagree. I think the sentiment holds for a great variety of courses and audiences.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Decorators are widely used, but surely you don't teach them in a one day introductory class aimed at beginners?<br></blockquote><div><br></div><div>Most of the time, no. Once, yes, because that's what the team needed. I was pretty proud of myself for handling that one. Because I had to teach decorators early, many other important topics were excluded.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Here is the syllabus for a ten week course:<br>
<a href="https://canvas.uw.edu/courses/1026775/pages/python-100-course-syllabus" rel="noreferrer" target="_blank">https://canvas.uw.edu/courses/1026775/pages/python-100-course-syllabus</a><br>
<br>
Note that decorators and even regular expressions don't get touched <br>
until week ten. If you can't fit assignment expressions in a ten week <br>
course, you're doing something wrong. If you can't fit them in a two <br>
hour beginners course, there is so much more that you aren't covering <br>
that nobody will notice the lack.<br></blockquote><div><br></div><div>It's not about any one particular topic, but the trade-offs between topics. A 10-week lecture course might be 30 hours of lecture, comparable to a 4-day "bootcamp" style course. I assure you that 4 days doesn't feel long enough when those last few hours are winding down. There's always more to say.</div></div></div>