Skip to content

Importing needs more details in README and a suggestion about import syntax #5

@molaeiali

Description

@molaeiali

Issue
You talked about importing in README and in examples "you could instead import the test_import file" but there are no examples of importing anything, I searched project files and found it the syntax is like:

import somefile

and somefile should be in your project dir or in RUMI_PATH dir. Plus, there is no info about where you can import and what happens when you import, Is it like copy and paste the code where you imported it? and you can import code in the middle of the code or at the end? or it should always be first in your file? Does it require once? or if I import something twice, it brings it twice? etc.

Suggestion:
Also, import syntax is not consistent with language syntax I think, It does not require ; at the end of it, and does not have <> " or any similar thing we use in other projects, I think it would be nice to have at least a semi-colon required at the end of the import statement to be consistent.
(I know for example C style includes are not semi-colon required too, but they are in a specific shape or "somefile" that make me think about them as special statements, but here my feeling is import is a statement [Maybe because I'm coming from a JS/TS/Java background])

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions