DEV Community

Discussion on: What are the great function/method/etc. names in popular libs/languages?

Collapse
 
hugo__df profile image
Hugo Di Francesco

unless in Ruby, although it's more of an operator.

Everything in JavaScript (not a fanboy of course), I can't think of a specific method that's named right but I also can't think of any that are named wrong 🤔.

Collapse
 
ben profile image
Ben Halpern

Operators are allowed—and anything related to the idea of naming things.

I too really like unless, though I see it get overused sometimes where ! would be clearer.

Collapse
 
ericcurtin profile image
Eric Curtin • Edited

"if (!" is clearer to most devs as it is available in more languages than "unless".