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

Make Core more modular #1392

Open
scolsen opened this issue Feb 23, 2022 · 1 comment
Open

Make Core more modular #1392

scolsen opened this issue Feb 23, 2022 · 1 comment

Comments

@scolsen
Copy link
Contributor

scolsen commented Feb 23, 2022

--no-core is great if you don't want to pull in anything from the standard library, however, because of interdependencies between files in core, you cannot pick and choose which modules to use easily.

For example, copy is defined in the module/file for the corresponding type, but str for all types is defined in String. In order to load core String routines, then, one needs to load every module that has str defined in String.carp. Likewise, Array defines for, which is needed by StaticArray and Control and Array in turn requires Maybe.

We should try to make the dependencies graph a bit simpler so that it's at least a little bit easier to use the core modules modularly.

@eriksvedang
Copy link
Collaborator

Yeah, I agree it's often hard to import things selectively in a good way. Moving str to each individual module could potentially help a lot, but maybe it leads to other problems?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants