Earlier quoted context omitted.
I'm still puzzled to why would a compiler allow assignment in an explicit conditional (outside of loop syntax). It's like a baked-in blindspot that most people just want to ignore for some reason. Some languages actually guard against this well enough (eg Kotlin) and say "don't". Even with guards in place, it's not all that complicated to work around in the edge cases where you might want to do it.
Because assignment is an expression. It has nothing specifically to do with the position being a conditional. Conditionals need an expression, and assignment fits the bill, so it works.
“I'm basically giving myself a permanent vacation from being BDFL”
371–380 of 764 posts
Re: “I'm basically giving myself a permanent vacation from being BDFL”
#372Earlier quoted context omitted.
I'm a little confused though, by his feelings here. Why did he feel the need to "fight so hard for a PEP" if it was so controversial, and everyone was outraged? I do understand people's points about "the age of outrage" and "internet 2018" but still: the PEP wasn't generally accepted as being a fantastic improvement, so why did he feel the need to fight so hard for it?
That's the very point of a bdfl : it assumes he knows better than others. Debating is for insight and cortesy, not mandatory.
I think it's not that he knows better, it's that there can be a single, coherent, consistent design consciousness.
A BFDL can create an effective process of evolution rather than some of the more egregious open-mob process failures that are prevalent in open source.
Re: “I'm basically giving myself a permanent vacation from being BDFL”
#373Earlier quoted context omitted.
...there isn't even a single person who stops the clock to evaluate what went wrong... This is perfectly consistent with 99% of the management behavior I've witnessed for years in the enterprise. We understand that we live in a world of cause and effect, but almost everyone is so busy poking at the effect that there's no energy left to discover and treat the cause. It's a shame that so many of us workers continue to…
This is because often the "cause" is actually jut time ticking : - What was fun 3 years ago isn't anymore - That feature that was useful to your customers is no longer serving purposes - It was about new feature, and now it's about maintaining compatibility - ... There is no real cause to "treat", you just need to adapt to the new environment you are facing.
> There is no real cause to "treat", you just need to adapt to the new environment you are facing.
Maybe, maybe not. The purpose of a deeper analysis should be to find out whether or not it might be like this - but you can't just assume it's like this from the start.
Re: “I'm basically giving myself a permanent vacation from being BDFL”
#374Earlier quoted context omitted.
I think that having strong opinions on how others should be developing software is how communities become toxic like this. "Shooting yourself in the foot is your fault for not using a linter that detects accidental misuse of assignment!"
Linter? You mean compiler right? The compiler should be warning for things like this, not relying on 3rd party tools. So, yes, if you're using a custom compiler, you kinda are to blame for shooting yourself in the foot. Just use the official binaries!
Re: “I'm basically giving myself a permanent vacation from being BDFL”
#375If Guido wasn't himself while writing the PEP572, I ask for a new vote about the PEP572. I vote against it, the PEP572 should not be implemented. To me, it seems a restricted variant on the specific cases "if" and "while" would be good enough, without generalizing to more cases. The exemples of assignment with "all()" and "any()" make me sad. Python had only one way of doing things, now it has two. Reading Python cod…
Downvoting was, long ago, supposed to be used to indicate trolling, incivility, not substantive, etc. Sometime recently, dang and sctb have ruled that downvoting for disagreement is now perfectly acceptable.
In any event, I agree it's become a terrible method of hivemind enforcement. Have an upvote.
Re: “I'm basically giving myself a permanent vacation from being BDFL”
#376Earlier quoted context omitted.
"Apple lives on with only memories of Steve Jobs." I think that remains to be seen.
> I think that remains to be seen. I'm sure there's more you could have written, why hold back?
I could be wrong, and I don't follow Apple closely, but the impression I get from longtime Apple fans is that the last few years have been a stream of mild disappointments.
Re: “I'm basically giving myself a permanent vacation from being BDFL”
#377It's interesting that GvR seems to have been the first official BDFL
Re: “I'm basically giving myself a permanent vacation from being BDFL”
#378Earlier quoted context omitted.
> Python 3 breakage and async turned out to be prescient, fantastic decisions. The jury is still out on the Python 3 decision, to be honest. Heck, Python 2 is still officially supported until 2020. Python 3 adoption is increasing, but the instability and breakage that it introduced caused a lot of knock-on effects throughout the Python community that held it back and hindered its adoption and mindshare. It'll take a…
> The jury is still out on the Python 3 decision, to be honest. It's not. Python 3 has overtaken 2 and there is no stopping migration to it now. Python 3.7 is a lot better than 2.7. Just on memory use alone, 3.7 is massively better. Sure, there will be some hold outs on 2.7 for a long time. That's fine. Also, this is not the say that migration from 2 to 3 was handled well. It wasn't. Python 3.0 should have had backwa…
this shows a superficial, almost entertainment-industry sort of view of a software development lifecycle..
in the latest Ubuntu Bionic with apps, building right now on a local machine, I see 143 python-xx packages installed and 43 python3-xxx ..
saavy package authors use import future and six to side-step the whole issue, while core maintainers struggle, and outsiders invoke a mob voice
Python 2.7 for LTS
Re: “I'm basically giving myself a permanent vacation from being BDFL”
#379I am glad that Python is recognized as the quality language it is.
Perhaps it's synchronicity that in other news this week Elon Musk triple hearted Python, https://twitter.com/elonmusk/status/1016002749446516737.
Re: “I'm basically giving myself a permanent vacation from being BDFL”
#380Earlier quoted context omitted.
Well, the best option would be to have := (or any other operator) as C style assignment in the first place. This is huge backward compatibility breakage though so the second best option is to use =. You can require additional brackets around assignment if you use the returning value (or otherwise it's syntax error). They did that with the new one anyway.
> You can require additional brackets around assignment if you use the returning value (or otherwise it's syntax error). They did that with the new one anyway. They only did it if the := is at the root level. The following is completely legal: if match := re.search(pat, text): `print("Found:", match.group(0)) or [y := f(x), y**2, y**3]