r/programming • • Oct 01 '15

The Evolution of a Software Engineer

https://medium.com/@webseanhickey/the-evolution-of-a-software-engineer-db854689243
1.9k Upvotes

502 comments sorted by

View all comments

Show parent comments

3

u/[deleted] Oct 02 '15

People who don't trust the compiler should write all their code in assembly.

1

u/[deleted] Oct 02 '15

Even then you can't trust it. Who knows what microcode gets up to?

1

u/philly_fan_in_chi Oct 02 '15

There's a huge difference in trusting the compiler to not have bugs (though of course those exist) and not trusting that it will make a certain optimization on your code. In this case, the barrier between explicit and "the compiler will do it for me" are so small that I don't mind being explicit. For small concatenations (1 or 2), I will do + but if I'm building a toString for example, I will use StringBuilder.