Why is there no switch/case/select statement?
Lua does not have a switch statement so there is no such statement in Jual. Similiarly for post/pre increment/decrement operators.
Is JualScript really zero-based indexed?
That depends on your definition of zero-based indexed. If by that you mean the following statement starts at zero,then yes:
var MyArray = ["one,", "two", "three", "four"]; MyArray[0] == "one"; MyArray[1] == "two"; MyArray[2] == "three"; MyArray[3] == "four";
The parser in Jual is designed to simulate the following statement in Lua
local MyArray = { [0]="one","two","three","four" };
So all string and number array definitions will begin from the index zero. As a result the length operator (#) is not used and a new size method is defined to obtain the true length of the array i.e use MyArray.size(). However, associative arrays will begin with a one based index. i.e:
var MyArray = {}; MyArray.Name = "apple"; // MyArray [1] == "apple" MyArray.Age = 2; // MyArray [2] == 2 MyArray.Color = "green"; // MyArray [3] == "green"
In most cases associative arrays are never enumerated through a numbered index so this should not be a problem. For associative arrays use the for .. in statement to loop through items.
Can you implement feature X for JualScript?
I am open to ideas at this point in time. Send me a message through the contact page on this site