🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

help with choice needed

Started by
3 comments, last by jeffB 21 years ago
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]
Advertisement
Check out python, lua, ruby, and tcl.

How appropriate. You fight like a cow.
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!)
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.
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.

This topic is closed to new replies.

Advertisement