Sclang extensibility

Just a side note, in danger of diverting the topic even further:

That is like every modern dynamic language out there. Sclang is really the outlier!

Language plugins would be great, although nobody has taken the effort for it.

Yes! IMO, the lack of a language extension API is a big disadvantages of SC. There are many things that you just cannot do purely in sclang.

Actually, I have thought about adding a simple stack-based extension API, similar to the Lua API. The big advantage is that you don’t need to expose any internal types and users don’t need to worry about the garbage collector. Unfortunately, it is very low on my TODO list (unless someone is willing to sponsor this :slight_smile:)


^^ The above post had been flagged as off-topic in another thread, but I don’t believe that canceling the post would be the right outcome. So I’ve pulled it into a thread of its own.



Yes, a case of a language that grew a lot with this was Python. All Numpy and scipy are libraries in c.

And languages that are not dynamic too, Haskell has FFI. Even in reverse, ghc can compile haskell to be imported into C as a library.