Skip to content

Conversation

kilianmh
Copy link

Replace keywords in defpackage :export and :shadow clauses with uninterned symbols. This avoids interning them in *package*, which should simplify autocompletion and may improve garbage collection.

@gefjon
Copy link
Contributor

gefjon commented Feb 23, 2022

Can you get the symbol names in the import-from clause in the test package?

@kilianmh
Copy link
Author

The symbol names in the test package :import-from clause are now also uninterned instead of keywords.

Reverting test package :IMPORT-FROM clause package name to KEYWORD, which should improve readability without unnecessary expansion of *PACKAGE*.
@kilianmh
Copy link
Author

Reverting test package :IMPORT-FROM clause package name to KEYWORD, which should improve readability without unnecessary expansion of *PACKAGE*.

- STRING as argument for INTERN, FIND-PACKAGE and FIND-SYMBOL
-> Avoid internalization of RUN-ALL-TESTS, FLEXI-STREAMS-TEST,
   STREAM-FILE-POSITION in KEYWORD package
@kilianmh kilianmh changed the title Fix keyword bloating in DEFPACKAGE clauses Fix symbol internalization in KEYWORD package Jul 22, 2022
@kilianmh
Copy link
Author

Summary:

Fix symbol internalization in KEYWORD package

  • Replace KEYWORD (except library-names) with STRING in FLEXI-STREAMS.ASD
  • Change DEFPACKAGE shadowed, imported, exported symbols to uninterned symbols

-> Reduction of KEYWORD package symbols by 54 when loading FLEXI-STREAMS
-> Improved KEYWORD auto-correction

(in-package :cl-user)

(unless (find-symbol (symbol-name :stream-file-position) :trivial-gray-streams)
(unless (find-symbol "STREAM-FILE-POSITION" :trivial-gray-streams)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break Allegro CL modern mode.

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

Successfully merging this pull request may close these issues.

4 participants