Why -flat_namespace is used by default on Mac?

Currently, Premake builds shared libraries on Mac with -flat_namespace. What was the reason to do so?

I've discovered this fact due to -flat_namespace breaks Qt plugin loading. I've read man ld and concluded this option is not really helpful because it degrades start-up performance.

Should be there a flag to disable (or enable, if removed by default) -flat_namespace?

After a quick Google search, I think I agree with you. Folks who do need it can add it back easily enough as a build option. Can you file a patch or bug report for it?

flat_namespace not only provides compatibility for previous Darwin versions yet also provides compatibility to how Unix ld works.

Can it affect well-written code?