View previous topic :: View next topic |
Author |
Message |
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Sun Jan 28, 2007 6:39 pm Post subject: Hosts for MiniD |
|
|
Can I use MiniD from a C++ application? Specifically, can I pass C++ data to a MiniD script and also have the script (directly?) update C++ data?
I'm shopping around for a scripting language to use in a new Text Editor that, unfortunately, is to be written in C++. (I've not given up hope to convince them about D yet, but it won't happen for V1.0 of the editor). _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
JarrettBillingsley
Joined: 20 Jun 2006 Posts: 457 Location: Pennsylvania!
|
Posted: Sat Feb 10, 2007 7:32 pm Post subject: |
|
|
I've thought about making a C interface to the MiniD library, but I'd like to finish the D interface first, at least
However some of the changes in the MiniD type system would make it rather difficult to do some more interesting things through a non-D interface.. MiniD has been designed to thoroughly be a D scripting language. But it might still be possible to expose the basic interface.
If you're looking for a nice scripting language for C++, have a look at Squirrel, which has been a source of inspiration for MiniD. Its class implementation in particular is similar to MiniD. It's rather similar to MiniD; the first snippet on its front page would be:
Code: | local table = {
a = "10",
subtable = {
array = [1,2,3]
},
[10 + 123] = "expression index"
};
local array=[ 1, 2, 3, { a = 10, b = "string" } ];
foreach(i,val; array)
{
writefln("the type of val is ", typeof(val));
} |
in MiniD.
There's also a binding library for it called SqPlus which is supposedly very easy to use. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|