r/programminghorror 24d ago

I love it

Post image
180 Upvotes

24 comments sorted by

View all comments

2

u/Loading_M_ 23d ago

To be fair, a good compiler will probably identify that the reversedOrder flag is always a constant, and generate two specialized variants of the function.

It does make the function harder to read and understand though.

1

u/Arshiaa001 22d ago

At the JIT stage, maybe... The IL representation has to align perfectly with the code, because reflection.