Okay, while designing ludascript lots of things came up that I never had considered. Now they need to be resolved. You guys just vote on whatever options you like best.
1) Function definition:The syntax for defining functions (for those that only use GM: GM doesn't need a function def syntax because it keeps scripts in separate files, but this only uses one file so it needs it).A) def FuncName(arg, anotherarg){}B) function FuncName(arg, anotherarg){}C) FuncName(arg, anotherarg){}D) FuncName = function(arg,anotherarg){}E) ~FuncName??arg::anotherarg -> <-2) Iterating 'i' from 0 to 'N'A) for (i = 0; i <= N; i++)B) for (i in 0:N)C) for (i from 0 to N)D) (FORLOOP (= i, 0) (<= i, N)(++i))3) Globals versus locals (how the user indicates the difference)A) global.global, localB) $global, localC) global, local.localD) gGlobal, local//small g + capital means global hereE) global AS GLOBAL, local AS LOCAL4) Arrays, by reference or by value?A) a = [];b = a;change(a);//both b and a are changedB)a = [];b = a;//the contents of 'a' are expensively copied into 'b'change(a);//only a changesC)a = [];b = a;//do not allow array assignments, this errorsOkay, the last one in each is a joke. Feel free to vote for em anyway. Suggest stuff too if you'd like.
B to all
B, A, A, B
A in #4 is one thing I hate about java, even though it makes perfect sense to reference the same object, I think it would be more practical to reference a new one. But sometimes A can be a good thing if you need multiple variables to change, it's kinda a gamble.sk8: Well, the idea is that either I can have it copy by ref by default and have a copy() function like this:
a = copy(b);or have it by value by default and have some hideous way of forcing by ref. The big problem is, if its by value by default you cant pass arrays to functions which will then change them. That's why I lean to A)BAAA
global.variable is too verbose for my tastes, I don't think I'm going to use it. Besides, there is no other case where '.' is used in my language (other than for decimals)
BAAB for sure.
I'm thinking that I should do away with semi-colons, because things can usually be inferred by context. Unsure though.
Keep them. The more ways to do something, the better.
How would semi-colons allow more ways to do something? I mean I'm thinking of not making them manditory. Also, 'the more the better' is not always true for programming languages, can make it hard to read programs.
A, A, B, B
I think you should keep the semi-colons in, just not mandatory, like you said. For people like me who are gonna have a lot of headaches when it starts throwing errors cause I put a semi-colon after every line :p