if foo ... else bah
, but probably doesn't fit the styoe of the Go grammer.What I absolutely hate is this proposal. Making
?
to magical™ things, making the code harder to read and reason about is bonkers.
# I am the Watcher. I am your guide through this vast new twtiverse. # # Usage: # https://watcher.sour.is/api/plain/users View list of users and latest twt date. # https://watcher.sour.is/api/plain/twt View all twts. # https://watcher.sour.is/api/plain/mentions?uri=:uri View all mentions for uri. # https://watcher.sour.is/api/plain/conv/:hash View all twts for a conversation subject. # # Options: # uri Filter to show a specific users twts. # offset Start index for quey. # limit Count of items to return (going back in time). # # twt range = 1 194476 # self = https://watcher.sour.is?offset=183977 # next = https://watcher.sour.is?offset=184077 # prev = https://watcher.sour.is?offset=183877
if foo ... else bah
, but probably doesn't fit the styoe of the Go grammer.?
to magical™ things, making the code harder to read and reason about is bonkers.
s
const value = some?.deeply?.nested?.object?.value
b:= SomeAPIWithErrorsInAllCalls()
b.DoThing1() ?
b.DoThing2() ?
// Though its not in the threads I assume one could do like this to chain.
b.Chain1()?.Chain2()?.End()?
?
in go.s
const value = some?.deeply?.nested?.object?.value
b:= SomeAPIWithErrorsInAllCalls()
b.DoThing1() ?
b.DoThing2() ?
// Though its not in the threads I assume one could do like this to chain.
b.Chain1()?.Chain2()?.End()?
?
in go.die()
-Funktion in $ZEILE
aus.“ Oder ein anderer Klassiker: „Ausgeschrieben würde der Code wohl folgendes tun…“. War sich der Autor also nicht ganz sicher, ob sein Codeschnipsel vllt. doch in Wahrheit was ganz anderes tut.
if err != nil {
...
}
if err != nil {
...
}
?
garbage. I don't want to be rude, but honestly wtf is wrong with people and making languages harder to read?! 🤦♂️
?
garbage. I don't want to be rude, but honestly wtf is wrong with people and making languages harder to read?! 🤦♂️
var f os.File
if f, e = os.Open("foo.txt"); e != nil {
log.Fatal("error opening file; %s", e)
}
var f os.File
if f, e = os.Open("foo.txt"); e != nil {
log.Fatal("error opening file; %s", e)
}
f := os.Open("foo.txt") or (e error) {
log.Fatal("error opening file; %s", e)
}
f := os.Open("foo.txt") or (e error) {
log.Fatal("error opening file; %s", e)
}