• PoastRotato@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    My coworker flips his shit every time I include a ternary operator in a PR. He also insists on refactoring any block of code longer than two lines into its own function, even when it’s only used once.

    He is not well liked.

  • Kogasa@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    People ITT hating on null coalescing operators need to touch grass. Null coalescing and null conditional (string?.Trim()) are immensely useful and quite readable. One only has to be remotely conscious of edge cases where they can impair readability, which is true of every syntax feature