Problem with coupling shared object symbol visibility with protection
Dicebot via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jan 28 03:42:18 PST 2015
My 5 cents:
1) "export all" approach is extremely limiting and I'd like to
see it go on Linux too. One of major problems with it is that
many forms of link-time optimizations (such as --gc-sections)
become simply impossible when compiler can't know what symbols
are actually supposed to be available externally.
2) first proposed solution does not allow to mark private
functions as "export". It implicitly exports those if they are
needed for actual public/export template function to work. This
is not the same - those functions still can't be called via
provide .di binding, it simply keeps them available for linking.
3) there is a big maintenance benefit from encouraging people to
explicitly mark their API, template or not. It is a clear sign
"this is a part of my libraries you are expected to use directly"
and that was what my idea for attribute inference abused.
More information about the Digitalmars-d
mailing list