Hacker News new | past | comments | ask | show | jobs | submit login

I'm certain he was using True and False as arbitrary values. It's a shame his point was missed. Please try to focus on his actual argument.



I'm not so convinced that it's not a fundamental thing.

Maybe someone wants to post a 'better' example and we'll see where it goes?


How about:

    if (condition())
        return 10;
    return 20;
versus

    val = 20;
    if (condition())
         val = 10;
    return val;


Well:

    val = condition() ? 20 : 10;
    return val;


Did you invert the logic of the parent post on purpose?


Or even:

    return condition() ? 10 : 20;




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: