>We'll have to change existing code to add missing semicolons and parentheses anyway so I don't think this is too terrible.
The thing about semicolons is that they're an "absolute standard" among c-like languages. On the other hand, "people" haven't agreed on a way to space out parens yet, and it affects readability in a complicated way. That is, these two blocks both have perfectly readable styles, and switching them wouldn't help that:
for (i = 0; i < items; i += 1)
{
itemy = view_yview[0]+ybegin+i*spacing;
if(drawbg)
{
. . . . .
>Which quotes should we use for strings? Single or double?
We use double quotes pretty extensively, and I think we should stick with that. As well, there's trouble when you have to nest strings, ie in plugins:
object_event_add(InGameMenuController,ev_create,0,'
menu_addlink("Plugin Options", "
instance_destroy();
instance_create(0,0,global.pluginOptions);
");
');
In that case, people seem to have "agreed" that the outer string should be single quotes, and the inner string (which happens to be inside the more significant bit of code) should be double quotes.
>Should we allow end-of-line comments?
I say yes. Example of how I use them:
do // bluh I really want goto right here but I have to use a loop instead
{
if(onground and step_free and step_there and vspeed >= 0) // valid downward slope
{
remainingy = 0;
y = round(y);
y += slopesize;
break;
}
floor_free = place_free(x, y+1); // makeshift caching for collision operations
here_free = place_free(x, y);
ongroundnew = here_free and !floor_free;
generally_free = place_free(x+hspeedpart, y+vspeedpart);
. . .
>I find them pretty unnecessary and less aesthetic than leaving them out.
I think that's because you're used to languages where they're not necessary, but to me, skipping parens is just as bad as skipping semicolons.
The symbol versions cause problems with gmksplit because xml uses symbols like "<" and such they are replaced to "<" or ">", which are catastrophes to reading.
The bigger reasons for me are that GM's code editor doesn't highlight them or recognize them as a "word", so you can't see them at a glance, distinguish them without parsing the texture, or ctrl+arrows over them.
>(!taunting can easily be confused with taunting at a glance)
"Not" is the one boolean operator which I believe should be used in symbol form. It's a single character, so there's no advantage to it not/being registered as a "word" within GM, and you can place it directly adjecant to whatever it is operating on, which makes absolute obvious that it's only operating on one value in the expression, and you can't do that with the actual word version. I just wish they were highlighted. Also, I disagree that it can easily be confused more than the word version.
Will look at some other things later tonight.