@Gankra The swift dynamic linking article is on HN again and I’m still mad that you didn’t say “where Rustn’t” in the title.

@steve write your own followup article where you detail how Swift's ABI and Library Evolution works in EXCRUCIATINGLY PRECISE terms so you have an excuse to make a better title

@Gankra @steve “Templated C++ functions cannot have their implementations dynamically linked.” wait this isn’t true though? PCL uses external templates a bunch in concert with a explicit instantiations to speed up compile times via dynamic linking the template implementations

@Gankra @steve it’s an absolutely ginormous foot gun but there’s nothing stopping you from doing in! (And even regular templates are dynamically linked in that their symbols are weakly recorded and the runtime linker arbitrarily throws out N-1 of the N addresses rather than complaining about duplicate symbols)

@Gankra @steve (this is actually what “inline” means in modern C++ - the ODR rule doesn’t apply, implemented as an ABI detail with weak symbols, and templates are all just implicitly inline)

@elfprince13 @steve did you really not read the paragraphs immediately following that statement

@steve @Gankra I literally stopped at that sentence to come be like “???”

@Gankra @steve yes I know you’re super fluent in ABI stuff, but that sentence is just factually incorrect as written, without at least a parenthetical about “in versions prior to C++11” or something

@elfprince13 @steve you're definitely right that I didn't know about the ODR thing and that it lets you dynamically link generic statics in C++, I only learned that a few weeks ago, coincidentally!

Of course the reason I learned that a few weeks ago was because someone was complaining to me that it doesn't actually work because windows(?) doesn't actually support it so if you're trying to write bare-minimum-portable software you can't use it and it may as well not exist :)

Follow

@steve @Gankra I have lived a happy and fulfilled life by mostly pretending Windows doesn’t exist for the purposes of software development. Curious though if this means VC++ tool chain doesn’t support it (but theoretically Cygwin/MinGW could), or like…PE file format is a blocker?

@elfprince13 @steve conversely i consider anything that doesn't support windows to be useless :)

Sign in to participate in the conversation
Mastodon

General topic personal server.