News for hackers. Stuff that matters.
Re:Ask HN: What's your simple but favourite coding trick? by catacombs on Monday May 18, 2020 @02:42PM (#23226667)
From your example, an even more concise way can be written using ternary operations in any C-style language:

    int i = 10;
    bool is_10 = (i === 10) ? TRUE : FALSE;

There are no comments on this comment yet.