Talk:LOLCODE

From Esolang
Jump to: navigation, search

Suggestions for Syntax/Spec Changes

It appears that BUKKIT is more analogous to struct or record in other languages, rather than array. Should this be changed in the description spec?

For an actual array, perhaps a syntax such as

     I HAS A <var> ITZ A SHELF, BTW possibly allow typed arrays: I HAS A <var> ITZ A SHELF OF <type>
   for declaration, and
     <var> R [THE] <numbr>'TH BOKS ON <shelf-name>, BTW THE is optional. Apostrophe is mandatory, separates TH from numbr, which could be a variable of type NUMBR - THE J'TH BOKS ON ...
   for retrieval, and
     [THE] <numbr>'TH BOKS ON <shelf-name> R <value>
   for assignment should be considered. (SHELF instead of BUKKIT, as changing the BUKKIT to this would be a breaking change)

There is also the possibility of a set type:

     I HAS A <var> ITZ A BAG, BTW typed sets possibly: I HAS A <var> ITZ A BAG OF <type>
   for declaration,
     PUT <value> IN <bag-name>
   to include a value in the set, (does not throw an error if it's already in the set)
     TAEK <value> OUTTA <bag-name>
   to exclude a value from the set (does not throw an error if it's not in the set)
     <value> IZ IN <bag-name>, O RLY? ...
   to test whether a value is in the set.

Freetrav (talk) 14:08, 8 May 2018 (UTC)