I propose that variables be lower case, and only lower case, so we can use uppercase for anything else. This will make the code as readable as possible, which is something the original examples were. This would mean that we don't really have to use any symbols for the syntax, as we can use capitalized words. For example:
I HAS var IZ 4 TIMEZ 3 BTW instead of I HAS VAR IZ 4*3
Assigning Variables
BTW create variable with default value I HAS <name> BTW create variable with value I HAS <name> ITZ <value> BTW assign value to variable <name> IZ <value> BTW assign new object (and call constructor) to variable <name> ITZA <object>
If we also allow underscores in variable names, I can go for it. — ILikePi, 2007/05/29 16:11
Readability is a goal of this language? I think allcaps better reflects the macros from which the language is derived. — Richard Fine, 2007/05/30 18:01
I propose MAH for local scope:
MAH <name> IZ <value>
— Ben Reiter, 2007/05/30 18:47
How exactly are variables declared, now? I thought
I HAS A VARTYPE ITZ VALUE
for a while, but now I can't tell. I'm making a LOLCODE→C++ interpreter, and would like to be sure (though I can just change it later if need be)
— Brandon Hood, 2007/05/31 03:26
I don't believe lolcats would use lowercase to differentiate variables - I don't believe they know how to use lowercase at all, for that matter. And readability is definitely not the major goal here - it's not about being easy to program in, it's about “looking right”, and I think uppercase everything looks, uh, righter.
Using lowercase for comments is fine, however, because lolcats wouldn't comment at all anyway, so it's just a little bit of human intervention here.
To Brandon: AFAIK the most widely accepted syntax would be I HAS A VARNAME ITZ VALUE.
— Garoo, 2007/05/31