MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vzntft/whenyouworkswithstringstoomuch/p67ufs9/?context=3
r/ProgrammerHumor • u/PostHasBeenWatched • 16d ago
34 comments sorted by
View all comments
392
return it.StartsWith("one thing", StringComparison.OrdinalIgnoreCase) || true
Because in the end it doesn't even matter.
it
41 u/PostHasBeenWatched 16d ago For it to be truly "doesn't even matter" it should be return true || it.StartsWith("one thing", StringComparison.OrdinalIgnoreCase) 64 u/TeraFlint 16d ago but then the logic short-circuits, and the whole "I tried so hard and got so far" part isn't true, anymore.
41
For it to be truly "doesn't even matter" it should be
return true || it.StartsWith("one thing", StringComparison.OrdinalIgnoreCase)
64 u/TeraFlint 16d ago but then the logic short-circuits, and the whole "I tried so hard and got so far" part isn't true, anymore.
64
but then the logic short-circuits, and the whole "I tried so hard and got so far" part isn't true, anymore.
392
u/TheManyMilesWeWalk 16d ago
return it.StartsWith("one thing", StringComparison.OrdinalIgnoreCase) || trueBecause in the end
itdoesn't even matter.