- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
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.
Admin
Mysteries like this one are what git blame was made for.
Admin
They'll know what it's for when in a few days the entire system crashes...
Edit Admin
Most likely the line predates the git.
Admin
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.
Edit Admin
Or whoever put it in is long gone and the commit message explains nothing.
Edit Admin
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. 😅
Edit Admin
Yes but no. If it was C++, one could imagine making a class something like this:
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...
Admin
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.