Direct Shared Library Use for Tcl9

Abstracted from Tcl 9.0 WishList to make that page easier to read...

Direct use of shared libs. It should be possible to use shared libs without any wrappers written in C.

DKF - I disagree, particularly since there is already code like Ffidl and Robin Becker's DLL caller out there already. Putting this capability in the core would encourage the writing of loads of completely impossible to port code, and would also discourage the creation of interfaces that leverage the best of both Tcl and the library being wrapped.

Volker - okay, is any of those packages going to be adopted by scriptics? I think, perl derives a lot of popularity from the fact that in a pinch you can write a wrapper around pretty much everything without bothering about compilers and C and stuff like that...

GPS - I think that it would be valuable to have this ability builtin to Tcl. Unfortunately ffidl is not very portable, because it uses libffi, which uses assembly. It won't compile in OpenBSD, but seems to work on most SysV based systems. Also, ffcall, which ffidl uses is a GPL library (the author says to contact him if this is a problem).

Vince While I think DKF has some good points, the existence and value of 'exec' and 'open |' in Tcl's core shows there is something useful in leveraging external code in a cross-platform way (if 'Ffidl' can truly be made to work cross-platform).

13jan04 jcw - Isn't this a prime candidate for an external extension, which - once mature - could be voted on to go into the core?

dbohdan 2015-08-21: Looks like this feature may soon be coming to Jim thanks to dimkr's work on integrating libffi bindings. See the pull request .