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

Define syntax of import paths #319

Open
Prime541 opened this issue Jul 14, 2022 · 0 comments
Open

Define syntax of import paths #319

Prime541 opened this issue Jul 14, 2022 · 0 comments
Milestone

Comments

@Prime541
Copy link

This discussion follows the pull request 314

Featuring LIBRARY PATH AND NAME
What syntax would you like for the LIBRARY PATH AND NAME part?

  • What should be the sub-directory separator? '/' vs '.' vs "'s'" vs other keywords
  • Is '..' (relative parent directory) allowed?
  • Are there relative/absolute "LIBRARY" and default <LIBRARY> path look-up syntax, like in C language?
  • Are there default library search path mechanisms, like ROCKSTAR_PATH=.:/etc/rockstar_std_lib?

Personally I like the 's because it looks English, however the grammar should not be ambiguous with the current is assignment contraction. Also having some more aliases would avoid having 's repeatedly in longer paths.

I don't really like, for security reasons, allowing the code to include anything from anywhere. Thus I would ban absolute path /blabla and random locations ../other. Instead I would limit the search, like in Python, to the relative children directories child/grandchild/library and the default locations listed in a ROCKSTAR_PATH environment variable. The implementation would search in order: in the directory of the currently executed (or imported) file, then in ROCKSTAR_PATH, then in an implementation dependent location which would contain the standard library followed by other implementation specific libraries.

What do you think?

@Prime541 Prime541 changed the title Define syntax of impart paths Define syntax of import paths Jul 14, 2022
@dylanbeattie dylanbeattie added this to the 2.0 milestone Mar 20, 2024
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