24 points sebg 1 day ago 11 comments
chowells 1 hour ago | parent
RantyDave 1 hour ago | parent
No, it returns KeyError. Or at least it should.
lyorig 1 hour ago | parent
travisd 1 hour ago | parent
with match now being available, we even return explicit error objects and the ergonomics are pretty good (reminds me of rust).
0cf8612b2e1e 26 minutes ago | parent
cache = {“key”: “value”, “some input”: None}
cache.get(“missing_key”)
Vs cache[“missing_key”]
There are better examples that could have been highlighted.lpghatguy 1 hour ago | parent
This distinction is something that I think is actually handy about JavaScript, and distinguishing between 'null' and 'undefined' is sometimes useful for similar reasons.
pwdisswordfishq 43 minutes ago | parent
woodruffw 39 minutes ago | parent
aw1621107 21 minutes ago | parent
ozyschmozy 18 minutes ago | parent
Waterluvian 37 minutes ago | parent
I bet this would be a good use of vibe coding. Experiment with what-ifs. I can imagine being able to “show not tell” and reduce the signal-to-noise of comment opinions.