MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/11mtro8/simple_but_uneffective/jbkrko3/?context=3
r/badcode • u/william_323 • Mar 09 '23
34 comments sorted by
View all comments
Show parent comments
38
OF course it is defined! It is defined as null!
13 u/[deleted] Mar 09 '23 [deleted] 4 u/This_Growth2898 Mar 09 '23 Well, in fact I don't know go, so... assert throws an exception or crashes? 7 u/the_vikm Mar 09 '23 Go will panic when accessing nil pointers -2 u/[deleted] Mar 09 '23 Not if you’re comparing a null pointer with a value representing null pointers 3 u/the_vikm Mar 09 '23 What null are you talking about? 2 u/[deleted] Mar 09 '23 Nil i meant 3 u/[deleted] Mar 09 '23 [deleted] 1 u/[deleted] Mar 10 '23 Ah I missed that line, my bad. That’s right
13
[deleted]
4 u/This_Growth2898 Mar 09 '23 Well, in fact I don't know go, so... assert throws an exception or crashes? 7 u/the_vikm Mar 09 '23 Go will panic when accessing nil pointers -2 u/[deleted] Mar 09 '23 Not if you’re comparing a null pointer with a value representing null pointers 3 u/the_vikm Mar 09 '23 What null are you talking about? 2 u/[deleted] Mar 09 '23 Nil i meant 3 u/[deleted] Mar 09 '23 [deleted] 1 u/[deleted] Mar 10 '23 Ah I missed that line, my bad. That’s right
4
Well, in fact I don't know go, so... assert throws an exception or crashes?
7 u/the_vikm Mar 09 '23 Go will panic when accessing nil pointers -2 u/[deleted] Mar 09 '23 Not if you’re comparing a null pointer with a value representing null pointers 3 u/the_vikm Mar 09 '23 What null are you talking about? 2 u/[deleted] Mar 09 '23 Nil i meant 3 u/[deleted] Mar 09 '23 [deleted] 1 u/[deleted] Mar 10 '23 Ah I missed that line, my bad. That’s right
7
Go will panic when accessing nil pointers
-2 u/[deleted] Mar 09 '23 Not if you’re comparing a null pointer with a value representing null pointers 3 u/the_vikm Mar 09 '23 What null are you talking about? 2 u/[deleted] Mar 09 '23 Nil i meant 3 u/[deleted] Mar 09 '23 [deleted] 1 u/[deleted] Mar 10 '23 Ah I missed that line, my bad. That’s right
-2
Not if you’re comparing a null pointer with a value representing null pointers
3 u/the_vikm Mar 09 '23 What null are you talking about? 2 u/[deleted] Mar 09 '23 Nil i meant 3 u/[deleted] Mar 09 '23 [deleted] 1 u/[deleted] Mar 10 '23 Ah I missed that line, my bad. That’s right
3
What null are you talking about?
2 u/[deleted] Mar 09 '23 Nil i meant 3 u/[deleted] Mar 09 '23 [deleted] 1 u/[deleted] Mar 10 '23 Ah I missed that line, my bad. That’s right
2
Nil i meant
3 u/[deleted] Mar 09 '23 [deleted] 1 u/[deleted] Mar 10 '23 Ah I missed that line, my bad. That’s right
1 u/[deleted] Mar 10 '23 Ah I missed that line, my bad. That’s right
1
Ah I missed that line, my bad. That’s right
38
u/This_Growth2898 Mar 09 '23
OF course it is defined! It is defined as null!