Hi, I just picked up Squirrel a few days ago, and so far I'm quite impressed with the language basics and possibilities. One of the things I did however find were a bit odd was how variable arguments are handled in functions, specifically that the varg[cv] 'variables' are not real objects. Wouldn't it be easier to extend the syntax of functions so that I could do something like:
function test(a, b, c = ...) {
foreach(slot, value in c) {
// code
}
}
If only two arguments are passed to test c will exist as an empty table, otherwise it should behave like vargv does now.
Although this changes relatively little, I think it helps in keeping the language a more consistent. Also, because the default value for 'c' is defined at runtime, it shouldn't pose problem implementation wise, I think.
Anyway, just my 2 cents, if anyone thinks I'm just shouting random junk, please hit me with an over sized trout or something in the spirit thereof :)