HackerTrans
トップ新着トレンドコメント過去質問紹介求人

_nosewings_

no profile record

コメント

_nosewings_
·5 年前·議論
It's also worth pointing out that, in a world where the Web is so pervasive, being honest (and, in particular, developing a reputation for being honest) has substantial advantages. Conspiracy theories and general suspicion spread extremely easily these days. If you ask the average American about the CDC today, I guarantee you a lot of them will mention the fact that the CDC initially said masks were unnecessary, and that they have since admitted that they were lying to protect supplies for healthcare workers.

Does that mean that being honest is necessarily always the best thing to do? I'm not sure. It's worth considering. But I suspect that it will take a while for that kind of understanding to make headway in the higher levels of government.

(This goes with the caveat that people and organizations who simply lie all the time can get away with it. Basically, you either have to live firmly in reality, or you have to sell a version of the real world that's been thoroughly modified in order to conform to some vision. Living mostly in reality while occasionally lying is becoming an untenable strategy.)
_nosewings_
·5 年前·議論
The mistrust runs in both directions (although the timbre is different). I believe that the CDC has had nothing but the best of intentions throughout the pandemic, but it's clear that they don't really trust US citizens enough to say what they really think. They see us through the lens of management; e.g., "How do we manage these people?"

Now, it's perhaps inevitable that they would use that lens, but it seems like it's the only lens they use.

Perhaps they're even right -- perhaps the average US citizen really is selfish and lacking in independent critical thinking skills, and perhaps we can't be trusted with the truth. But it means that anyone who knows better is constantly trying to read between the lines.

I blame the pervasive PR culture in the US, as well as basic stuff like a shit education system.
_nosewings_
·5 年前·議論
R0 is indeed static. It's R(t), the reproduction rate at time t, that is not static.
_nosewings_
·5 年前·議論
> What object is the scope of a comprehension (in Py 3; in py 2 they don't have their own scope) a dict attached to?

The generator object that gets created behind the scenes.

> And, if you can answer that why could there not be such an object for a pattern match expression?

There could be, I suppose, just as there could be for "if" or "for". If Python decided to have lexical scoping everywhere, I would be in favor of that (but then people would complain about breaking changes). In lieu of that, I like the consistency.
_nosewings_
·5 年前·議論
In Python 3, list comprehensions use generators behind the scenes.
_nosewings_
·5 年前·議論
Not introducing a new scope with a match is unfortunate, but it's also consistent with how every other language feature interacts with scoping.

> (As well as a method to “pin” variables from the containing scope to use them in matches.)

This is a good idea, I agree -- at least for Python, where you would obviously just call __eq__.

EDIT: It looks like you actually can match against constants with this PEP, as long as you access your constant with a dot (e.g., HttpError.NotFound). This seems like a perfectly reasonable solution to me.
_nosewings_
·5 年前·議論
The explanation is that (in Python 3) list comprehensions are really just syntactic sugar for generator expressions. In Python, "scope" is really a synonym for "dictionary attached to some object", so generators can have local variables (since they have their own internal scope), but purely syntactic constructs cannot.
_nosewings_
·5 年前·議論
If you really need to compare against a variable, use an "if". The primary benefit of pattern-matching is destructuring.

EDIT: It looks like you actually can match against constants with this PEP, as long as you access your constant with a dot (e.g., HttpError.NotFound). This seems like a perfectly reasonable solution to me.
_nosewings_
·5 年前·議論
That's just an inevitable consequence of the fact that, in Python, "scope" is synonymous with "dictionary attached to some object." This is already how for-loops work.
_nosewings_
·5 年前·議論
Yes, of course. Again, this is how it works in basically every mainstream language with this feature.
_nosewings_
·5 年前·議論
This is how pattern matching works in any language (except for some niche languages that allow nonlinear patterns, like Curry).

Many of the comments here reveal a bizarre parochialism.
_nosewings_
·6 年前·議論
IMO, the Web could stand to be a little bit harder to use.
_nosewings_
·6 年前·議論
That's essentially the leading theory. They're called WIMPs.