Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce structured data types to LOLCODE #9

Open
AlexisGoodfellow opened this issue Sep 26, 2018 · 3 comments
Open

Introduce structured data types to LOLCODE #9

AlexisGoodfellow opened this issue Sep 26, 2018 · 3 comments

Comments

@AlexisGoodfellow
Copy link

AlexisGoodfellow commented Sep 26, 2018

I am in favor of the following syntax for declaring a structured data type:

DIS IS A <class_name> KINDA LIKE A <base_class_name> BUT
   IT GOT A <variable> 
   IT GOT A <variable> ITZ <value>
   IT CAN <function_name>
OKIE

Instantiation can be done with: I HAS A <instance_name> ITZ <class_name> BORN WIF <arguments>, or <instance_name> R <class_name> BORN WIF <arguments>
Accessing elements of the structure can be done with I HAS A <variable> ITZ DA <field_name> OV <instance_name>, or <variable> R DA <field_name> OV <instance_name>.

Other syntax could be used - but I would certainly like structured data types!

@kierajreed
Copy link

kierajreed commented Sep 27, 2018

I HAS A <class_name> WIF <constructor args> maybe?

@kierajreed
Copy link

kierajreed commented Sep 27, 2018

also,

... BUT
   MEK WIF <arguments> FO
      <statements>
   OKIE
OKIE

@AlexisGoodfellow
Copy link
Author

That syntax looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants