Skip to main content
GameDev.net gamedev.net
🔒 Locked

help with choice needed

Started by jeffB Jun 4, 2003 at 10:07 AM 3 replies 650+ views
Original Post
jeffB
jeffB
I need to learn a scripting language. I'd like it to be able to: Expose classes to the scripting language (for instantiation) Expose class methods Be able to handle STL containers Be quick to learn Basically I'd like it to be able to handle classes with signatures similar to this:
class A
{
public:

 ...

 const std::list<SomeOtherClass>& GetList()const{return smc;}

 void SomeMethod(float val, std::container<SomeType>& st);

private:

  std::list<SomeOtherClass> smc;
};
 
I'd welcome any advice you can give. [edited by - jeffB on June 4, 2003 11:45:56 AM]
Sneftel
Sneftel
Check out python, lua, ruby, and tcl.


How appropriate. You fight like a cow.
jeffB
jeffB
I was hoping you would be more specific. I don''t have much time and each language has a lot of documentation to wade through. I''ve spent most of the day learning about lua for example, but so far no one has confirmed if it copes with the STL or not, and (more importantly) shown me an example. If it does, then lua (via toLua) is probably going to be okay. Can anyone direct me to a snippet that demonstrates lua with the STL?

Does anyone have any experience with using lua to expose classes? How long is it going to take me to learn? (I''m in a rush!)
Sneftel
Sneftel
If you are in a rush, don''t use scripting languages. A scripting language, more than almost any other external component, requires a lot of time to get to know its intricacies and caveats. There simply are no easy answers.

AFAIK, no binding generators automagically allow you to expose STL containers to scripting languages and have them look like arrays. This is because you generally export a small subset of your engine''s functionality to the scripting system, which almost always excludes direct member data.


How appropriate. You fight like a cow.
Oluseyi
Oluseyi
Unless you have certain constraints, why not consider using the scripting language for the container? Expose the type being held in the container to the scripting language and use a sequence type to hold instances of it.

Unless you have certain constraints, of course.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.