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

Implement recursive type and function declaration #17

Open
Jegp opened this issue Jan 24, 2016 · 0 comments
Open

Implement recursive type and function declaration #17

Jegp opened this issue Jan 24, 2016 · 0 comments

Comments

@Jegp
Copy link
Member

Jegp commented Jan 24, 2016

When defining objects it should be allowed to reference the same object and when defining functions the function body should be able to reference the same function.

def Object(a as Object)

def function(a as Number) = { if (a < 10) function(a + 1) }

However the last option could lead to infinite loops:

def function() = function()

So we either allow everything, invent some recursion-discovery mechanism or simple disallow loops in functions for now..

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

1 participant