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

> So, you get the best of both worlds.

I would really not call code that looks like this "best of both worlds"

    KJ_IF_MAYBE(value, maybeValue) {
      use(value);
    } else {
      handleNull();
    }
when compared to

    if(!value) 
      handleNull();
    use(*value);


Kind of unfair that you didn't include the `else` or the braces in your version, just to make it look shorter.




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

Search: