• Hanzito (unregistered)

    Makes me wonder: don't they have version control? Because I would want to check what else the person who touched that line has changed. For he's no King Midas.

  • 516052 (unregistered)

    Mysteries like this one are what git blame was made for.

  • DQ (unregistered)

    They'll know what it's for when in a few days the entire system crashes...

  • (nodebb)

    Most likely the line predates the git.

  • Rob (unregistered)

    I prefer the way Go and (since 22) Java handle _: it's not just a linter hint, it's a compiler instruction. You can't use it even if you tried.

  • (author) in reply to Allexxann

    Or whoever put it in is long gone and the commit message explains nothing.

  • John Melville (unregistered)
    Comment held for moderation.
  • (nodebb)

    Hard to say for sure without taking a look at the surrounding code but it might be the kind of line you add temporarily to be able to set a debug breakpoint on it. I've see quite a few of those, forgotten in the rush to close a support ticket from an important client. 😅

  • (nodebb)

    This is C#, though it could be basically any language.

    Yes but no. If it was C++, one could imagine making a class something like this:

    class Absorber
    {
    public:
        template<class T>
            Absorber &operator =(const T &)
            {
            };
    };
    

    Now make a variable of this type, call it, say, _, and you can "assign" anything to it.

    Of course, it does nothing to mitigate the mystery of the expression in the article's code...

    Addendum 2026-05-12 09:16: Bah, there should be a "return this;" in the function...

  • kythyria (unregistered) in reply to AGlezB

    Writing a weird noop just to have a breakpoint is slightly odd in C#, where System.Diagnostics.Debug.Break() exists. Granted, that's completely unconditional.

Leave a comment on “Underscore Its Unimportance”

Log In or post as a guest

Replying to comment #697872:

« Return to Article