Comment on The Modern Java Ecosystem (for the Sinatra or web.py lover)parentComments−mbell14yI seem to remember this same feature causing lots of headache in C in the form of subtle bugs mostly the result of this being used in awkward ways.Personally I'd rather have a distinct boolean value to test for, the java version is much more explicit as to exactly what its doing.−waffle_ss14yHmm can't say I've ever encountered something like that in Ruby so far. However, if you want a strict boolean it's pretty easy to get: !!STUDENTS.remove(uid)
Comments
I seem to remember this same feature causing lots of headache in C in the form of subtle bugs mostly the result of this being used in awkward ways.
Personally I'd rather have a distinct boolean value to test for, the java version is much more explicit as to exactly what its doing.
Hmm can't say I've ever encountered something like that in Ruby so far. However, if you want a strict boolean it's pretty easy to get: