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

importing types #20

Closed
jlongster opened this issue Oct 29, 2012 · 3 comments
Closed

importing types #20

jlongster opened this issue Oct 29, 2012 · 3 comments

Comments

@jlongster
Copy link

If I have split my code up into a few files, and one of them contains struct definitions, how do I use them in a different file? I can't seem to get the compiler to import them at compile-time somehow.

@syg
Copy link
Collaborator

syg commented Oct 29, 2012

Types are intra-file only at the moment. Once it passes the JS-LLJS barrier, type information is lost, much like the problem in gradual typing. We could introduce some kind of import mechanism (open to suggestions here), or if you're feeling really 1970ish you can actually use CPP.

@jlongster
Copy link
Author

Ok, thanks. Yeah, I might try to figure out how to write a few header files that I can include across my project. Feel free to close this issue if this isn't in scope any time soon.

@jlongster
Copy link
Author

Closing as this doesn't really seem to be on the roadmap

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