Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I actually think the variadic logical and is more readable, and wish more languages had it. As long as all the arguments are lined up vertically, you can think of it as a sequence of tests for true that exits at the first failure. It's more obvious with the variadic operator. Contrived comparison:

  if (a != null && x != 0 && a.use_it(x))
  {
      ...
  }


  (if (and (not (null a))
           (/= 0 x)
           (use-it a x))
      ...)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: