AlemSnyder / Fun-Game

I am just practicing c++. Feal free to enjoy.
GNU General Public License v2.0
1 stars 0 forks source link

Add a scripting language #17

Closed egelja closed 11 months ago

egelja commented 1 year ago

Python

Pros:

Cons:

Lua

Pros:

Cons:

Scheme

Pros:

Cons:

AlemSnyder commented 1 year ago

what are you going to do with a scripting language? (add this to the issue) you should try to get some code samples running with each language. HelloWorld, count to 10,000, etc.

AlemSnyder commented 12 months ago

What do you think about this?

It has cpp syntax, and is made to be integrated into cpp. It seems ChaiScript is 3-10 times slower than Lua. As long as its not being called every frame should be fine.

egelja commented 11 months ago

No I think chai script is stupid. It has cpp syntax, with references, and the point of that is to enable optimizations. But it’s slower than Lua. So what’s the point of writing and thinking about these semantics if you can just write Lua and not think about it?

Take a look here. The top three languages are C, Lua, and Terra (aka Lua with memory management). https://github.com/r-lyeh-archived/scriptorium

So just use Lua.

AlemSnyder commented 11 months ago

53 Lua is added.