Conversation started Apr 15, 2019 at 17:16.
Apr 15, 2019 17:16
Ooh
I forgot a str ()
Fekking Python and is lack of implicit conversions
I like it, you have to be careful
print ("log: " + state.room)
I guess it comes with extreme opereator overloading
Apr 15, 2019 17:18
I'll take c# any day for a multitude of reasons
'54' % '4' != 54 % 4
even though neither is error
Actually wait, it is
oh well goes of to find better example
Fekking Markdown and its taking my asterisks litterally
Javascript says "hold my beer," +!+[] and '0' == 0
or unlitterally I gues
Apr 15, 2019 17:22
Apr 15, 2019 17:43
For Python, 0 != ""; "" != [ ]; [ ] != 0 but 0 == False; "" == False; [ ] == False
Oh wait no
None of them equal False
They just evaluate as falsy
bool(x) == False
@Draco18s Just prooves your point about conversions
Actually 0.0 == 0 though type(0.0) != type(0)
That's more of a "javascript does terrible things", but yeah
But implicitly converting to a string is fine IMO
Apr 15, 2019 18:08
(For concatenation, equality, no)
 
6 hours later…
Apr 16, 2019 00:01
@Draco18s At last, I thought of an example! Not an obscure one either: '5' * 3 == '555'; 5 * 3 == 15
I don't really see why that's bad
Automatic coercion to and from strings can lead to ambiguous behavior
Like does '5' * 3 equal 15 or '53'?
Both are reasonable outcomes with coercion
Python is strongly typed by design.
 
Conversation ended Apr 16, 2019 at 0:04.