Update on Scripting Languages

So, I asked a while ago for feedback on the choice of scripting languages. I got a lot of good feedback, and I’ll try to summarise it here.

I made the foolish mistake of suggesting that PN support both JavaScript as a basic scripting language and Python as a more advanced option for those that have Python. However, this of course led to many people just saying “yeah, give me both”!

Some people requested support for a MS Active Scripting interface (and/or COM interface) even though I said that I had no desire to provide one. I know that it provides linkage to a number of different interpreters, but it is non-portable and it requires a lot of COM overhead for every operation - I’d prefer a tight scripting language binding that can (eventually) be ported to other platforms.

In total, there were many more requests for Python than there were for JavaScript. As I pointed out, I really do like Python and always intended to provide support for it. Given that most of those that said they wanted JavaScript also wanted Python, I’ve decided to implement support for Python first and see how we go.

I intend to do this using some form of extending plugin, so that I don’t tie the UI closely to any scripting language. This will mean that those that suggested things like .NET scripting will be able to implement it easily using Managed C++ and IJW to create a .NET binding. I do want to be able to provide an interactive shell for those languages that support it (including Python), so this will need to be built into the interface somehow.

I’ve started work on making the core code of PN a bit more public-friendly, so that concepts like Document and View can be sensibly and safely represented to plugins. I’m looking at using Boost in PN from now on for the benefits such as shared_ptr for allocation/deallocation management of objects that may be shared with extensions. It also provides Boost::Python which I’ll be looking at when integrating Python (although I’m wary that I’ve heard Boost::Python has a habit of producing very large code).