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

discussion: individual formula layout #15

Open
timotheecour opened this issue Feb 1, 2019 · 0 comments
Open

discussion: individual formula layout #15

timotheecour opened this issue Feb 1, 2019 · 0 comments

Comments

@timotheecour
Copy link
Contributor

timotheecour commented Feb 1, 2019

Why not soloud.nim? Every directory will have wrapper.nim this way.

goals

  • a formula should be easy to import for client code, eg: import soloud
  • everything related to a formula should be self-contained in either a single file or a single dir but (preferably...) not both, eg not:
soloud.nim
./soloud/

https://github.com/dlang/phobos/blob/master/std/range/package.d

  • formulas should be able to evolve from single file to directory without breaking client code

proposal 1 (requires nim compiler support)

proposal 2 (without nim compiler support)

when upgrading from a single file foo.d to a directory foo/, we can do this:

  • before:
# in foo.nim:
# wrapper code goes here
  • after:
# in foo.nim:
# only 2 lines, eg:
import foo/wrapper
export wrapper

# in foo/wrapper.nim
# wrapper code goes here

# in foo/demo.nim
# demo code goes here

# etc: additional files specific to formula can be added
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