Nicolas Martyanoff on Nostr: Go 1.21 introducing min and max is good. Go devs finally realizez that "c := ...
Go 1.21 introducing min and max is good. Go devs finally realizez that "c := max(a,b)" is better than:
c := a
if b > a {
c = b
}
If we're luck in a couple years they'll finally understand why so many have been asking for the conditional ternary operator. One can dream.
Published at
2023-08-10 07:26:10Event JSON
{
"id": "7321de1a422e29db6c115083fbe6057f8a0b7811ff610620ac3db4b1eb686b72",
"pubkey": "f320bdda416aa99f2ae0949dca56c3bf58a9815c9de7ba950ad1fa568da2b816",
"created_at": 1691652370,
"kind": 1,
"tags": [
[
"proxy",
"https://emacs.ch/users/galdor/statuses/110864129739160156",
"activitypub"
]
],
"content": "Go 1.21 introducing min and max is good. Go devs finally realizez that \"c := max(a,b)\" is better than:\n\nc := a\nif b \u003e a {\n\tc = b\n}\n\nIf we're luck in a couple years they'll finally understand why so many have been asking for the conditional ternary operator. One can dream.",
"sig": "5af166290135873753fa325a5946827396ebc66bb2533519765849daa3fd6a4d5370e42c9bd94f3137ec6666bd6a5d31e88c4b613a44cd8c15ad4c57d0fe175c"
}