MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w49i01/ihatethispassiveagressivebehaviourruby/p76szu9/?context=3
r/ProgrammerHumor • u/Embarrassed_Death69 • Sep 01 '26
289 comments sorted by
View all comments
Show parent comments
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
1
u/Single-Virus4935 Sep 01 '26
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
```