tiennou/extempore — comment on commit c96e9eccaab7d104c7353c1bb4c0a712d44e1677
File:  line 0
By tiennou:

Library wrapper meaning written in Extempore Scheme ;-) ? Then I'll try to rewrite that... But I want to discuss a few points first ;-).

My rational for changing `sys:open-dylib` directly was that it would insulate Extempore lang users from details like dynamic library extensions (".dll", ".so", ".dylib", depending on the platform) the most we can, so that users can easily write portable scm files without having to remember that their file will only work on a platform without making a `(sys:open-dylib (if (sys:platform "Linux") "libblah.so" "blah.dll")` dance. The change above allows that, but I wanted to extend a little more by actually having an array of strings (in case the name *really* is different between Linux, OS X and Windows, like I'm seeing with the GLUT lib), so that `sys:open-dylib` would try each of them in order before reporting a failure.

I don't think I'll use "require" for that though, because I want "require" to keep its "load an Extempore file from an arbitrary load path" meaning, while `sys:open-dylib` wraps `dlopen()` and needs a subsequent call to actually bind a symbol (using `bind`, which I would love to rename `sys:bind-dylib` BTW, since it's closely related to the other).

Does that convince you :-p ? Else I'll bite the bullet and try to come up with a good function name (that's neither `sys:open-dylib` nor `require`, does `bind-lib` rings a bell ?)...