robb / Asterism

Asterism is yet another functional toolbelt for Objective-C. It tries to be typesafe and simple.
http://robb.github.io/Asterism/
MIT License
226 stars 12 forks source link

Add documentation how to avoid linker problems if name mangling changes OR work around that altogether #20

Closed robb closed 10 years ago

robb commented 10 years ago

Essentially:

or:

/cc @wrl

robb commented 10 years ago

I begin to like the static inline approach. I feel like Asterism is very bare bones so being a fully transparent set of what would effectively amount to macros could help maintain that focus.

robb commented 10 years ago

@kastiglione iirc you said you used overloaded C functions in production, what's your take on this?

kastiglione commented 10 years ago

I've only used overloaded C functions in application code, where versioning and name mangling wasn't an issue.

For overloaded functions in a library, I would take this approach: http://garbagecollective.quora.com/Overloadable-functions-across-link-unit-boundaries-in-C

It's a little extra work, but seems like a reliable solution.

robb commented 10 years ago

Looks like a great compromise, thanks!