MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w49i01/ihatethispassiveagressivebehaviourruby/p75zoso/?context=3
r/ProgrammerHumor • u/Embarrassed_Death69 • 17h ago
264 comments sorted by
View all comments
6
Golang: "wie dont do that here" meme
3 u/deceze 17h ago Wie jetzt, warum nicht? 1 u/Single-Virus4935 14h ago Golang konvertiert keine typen implizit. Du kannst einem int keinen int32 zuweisen ohne explizit zu casten int(i). Boolean conversions gibt es gar nicht: ``` i := 1 if i { fmt.Println("Hello, 世界") } } // ./prog.go:8:5: non-boolean condition in if statement ``` ``` i := 1 if bool(i) { fmt.Println("Hello, 世界") } // ./prog.go:8:10: cannot convert i (variable of type int) to type bool ```
3
Wie jetzt, warum nicht?
1 u/Single-Virus4935 14h ago Golang konvertiert keine typen implizit. Du kannst einem int keinen int32 zuweisen ohne explizit zu casten int(i). Boolean conversions gibt es gar nicht: ``` i := 1 if i { fmt.Println("Hello, 世界") } } // ./prog.go:8:5: non-boolean condition in if statement ``` ``` i := 1 if bool(i) { fmt.Println("Hello, 世界") } // ./prog.go:8:10: cannot convert i (variable of type int) to type bool ```
1
Golang konvertiert keine typen implizit.
Du kannst einem int keinen int32 zuweisen ohne explizit zu casten int(i).
Boolean conversions gibt es gar nicht:
```
i := 1
if i {
fmt.Println("Hello, 世界")
}
//
./prog.go:8:5: non-boolean condition in if statement
if bool(i) {
// ./prog.go:8:10: cannot convert i (variable of type int) to type bool
6
u/Single-Virus4935 17h ago
Golang: "wie dont do that here" meme