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

Use uiop:define-package in package section #539

Open
kilianmh opened this issue Apr 20, 2024 · 3 comments
Open

Use uiop:define-package in package section #539

kilianmh opened this issue Apr 20, 2024 · 3 comments

Comments

@kilianmh
Copy link
Collaborator

uiop define-package is more flexible with additional clauses and more convenient during development (e.g. when symbols change).

I want to add some examples in the packages page for uiop:define-package.

Currently there are only examples with cl:defpackage.
My question is: Should we add a few examples with uiop:define-package but keep it mostly with cl:defpackage or should we convert most package definitions to uiop:define-package and only showcase few examples of cl:defpackage?

@vindarel
Copy link
Contributor

Hi, I think it's great if we mention it (even required), maybe not in the introductory examples. defpackage works when we begin, after all.

Shall we add a second "packages (advanced)" page?

Presenting define-package's other clauses, the difference in behavior, also shadowing imports would be very useful.

@Jach
Copy link
Contributor

Jach commented Jul 25, 2024

+1 on keeping things the normal cl:defpackage unless otherwise needed.

Extending the existing page would probably be best, as it's already bringing up more advanced topics by the end with locked packages. A simple example I like is in the generic-cl docs: https://gutev.dev/generic-cl/#using_specific_interface

Somewhat related, do you think a section on ASDF package-inferred-system as in #264 would best live in the Systems page, the Packages page, or a separate page? I was thinking it might be useful to have a section in the Packages page on just the style of having a main package(s).lisp file vs. one file, one defpackage, vs. going further with the package-inferred-system feature. Perhaps it's something more relevant for a separate issue as part of some new "Project Organization" page that can collect the various styles and tradeoffs that projects do in the wild.

@vindarel
Copy link
Contributor

yeah I can see that in a new page, otherwise it will trip up newcomers too easily. A "Project Organization" page would fulfill a demand I think.

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

3 participants