DEV Community

Discussion on: What language features/concepts do insiders of the language love and outsiders hate?

 
6temes profile image
Daniel • Edited

Actually, it your be more idiomatic to write:

[].empty?

I do love Ruby for those things. I can write business code in a way that is perfectly understandable the first time I read it.

Thread Thread
 
ben profile image
Ben Halpern

Yeah, this was a bad example

Thread Thread
 
databasesponge profile image
MetaDave πŸ‡ͺπŸ‡Ί

But I like #zero?, and have found situations where x == 0 was not "working" and x.zero? was. Don't ask me what it was though – I can barely remember yesterday – but maybe someone can explain that.