# What do you guys think of this?

This topic is 4160 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

This is my latest implementation of my scipting language JemScript. I designed it to work with DarkBasic Professional, as the lack of scripting really got annoying, and all other scripting packs cost money. I've tested the two, and this one runs about 3 times faster than DBPro! One disadvantage is is runs completely asynchruously from DBPro, and the VM executes it all at once, so recieving return data from functions is not possible. This is a simple program:
//Display text
function display(var txt)
{
print txt; endl;
}

//Addition function (just for the hell of it :P)
{
return a+b;
}

//Main function (doesn't necesarly have to run first, but it's the one that's being called)
function main()
{
display( "3 + 4 = " + string(add(3,4)) );
}

As you can see, its modular, has scoping, it weakly typed, have simple typecasting (only int, float and string), and also supports: if/else and do/break. I also intend to make simple tables. They will have nothing to to with the VM, they will just be compiled differently. They might look a little something like this:
player = [

var name = "Zotoaster";
var age = 10000000;

details = [

var height = 5.5;
var weight = -2.2;

]

]

And just to let you know, it doesn't support arrays :/ So, what do you think of it so far? Is there anywhere I could improve on? Maybe any features I should/could add? Please leave comments and critiques :] Cheers

##### Share on other sites
Seems ok, without a demo or anything more concrete you'll not get much more feedback ;)

Few things though:

You mention it is modular, but I see no constructs for modular programming.

Performance compared to other languages is irrelevant unless you're providing the exact same facilities.

Why have a 'var' keyword when the language is dynamically typed? Surely you don't need it for syntactic ambiguity (since there isn't any in the snippets you've provided)? Hell, why have it even if the language is statically typed :)

Similar for the function keyword, it seems redundant in the snippets.

What truly is the purpose of this language? It just seems like a more limited version of Lua or something with nothing really to distinguish it. I'd like to see some more game specific ideas e.g. comprehensive string handling, built-in state machines, complex built-in data structures and data structuring facilities (tuples, records, atoms/symbols).

You haven't mentioned the execution model, other than it being 'asynchronous' with DarkBasic - what do you mean by this? how do you control data or call functions in DarkBasic? How do you write these bindings? Can I create coroutines? True asynchronous processes? How about latent functions? (i.e. functions in DarkBasic that halt execution of a JemScript until complete)?

Good work though, creating languages isn't easy :)

1. 1
Rutin
22
2. 2
3. 3
4. 4
5. 5

• 9
• 9
• 9
• 14
• 12
• ### Forum Statistics

• Total Topics
633307
• Total Posts
3011289
• ### Who's Online (See full list)

There are no registered users currently online

×