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

Send blocks as params #5

Open
zaher opened this issue Jan 10, 2015 · 0 comments
Open

Send blocks as params #5

zaher opened this issue Jan 10, 2015 · 0 comments
Labels
Milestone

Comments

@zaher
Copy link
Member

zaher commented Jan 10, 2015

now we can send params when call object

MyObject(x,y);

But i like to send also blocks that can executed also but by object body

MyObject(x,y){ print "Hellp Word"};

the declaration of MyObject like this (for example not sure it is right way)

MyObject:int(x,y)(foo, bar){  //number 1 meant we accept one block
  ...
  foo; //here we well execute the block (first block)
  ...
}
//Using it (calling it)
MyObject(10, 5){ print("Hello"); }{ print("World"); }

It is good idea to implement "if" or "while" or "loop" but we need add it internally.

@zaher zaher added the idea label Jan 10, 2015
@zaher zaher added this to the Syntax milestone Jan 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant