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

Mutually recursive and "out of order" type declarations #4729

Closed
thomasmcoffee opened this issue Nov 4, 2013 · 3 comments
Closed

Mutually recursive and "out of order" type declarations #4729

thomasmcoffee opened this issue Nov 4, 2013 · 3 comments

Comments

@thomasmcoffee
Copy link

Mutually recursive type declarations such as

type A
        a :: B
        b
end

type B
        c :: A
        d
end

appear to be presently unsupported, as per this discussion:

https://groups.google.com/forum/#!msg/julia-users/LctRzct1R-M/s_vLVUxSyVcJ

More generally, "out of order" type declarations also appear to be unsupported.

Mutually recursive declarations are important for many recursive data structures: in complex cases, the workarounds required to produce singly recursive declarations can produce highly unreadable code with excessive redundancy and obscure relationships to the original concept.

"Out of order" declarations are important for some forms of generic programming that depend on altering a subset of type definitions: in complex cases, the workarounds required to organize the inclusions in ordered form defeat much of the purpose of avoiding the unnecessary code duplication.

I believe this issue is already well known, but I did not find an open issue on Github, which prevents easily checking its status.

@simonster
Copy link
Member

I think the existing issue is #269.

@StefanKarpinski
Copy link
Member

Yep. It's an old one. Closing as dup.

@thomasmcoffee
Copy link
Author

Thanks --- didn't find it using the keyword "recursive."

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

3 participants