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

Fix: char-code for *whitespaces* characters #123

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kilianmh
Copy link
Collaborator

Use char-code for *whitespaces* characters.
This should prevent future problems with some
implementations that do not support specific
characters in the reader.

This should work regardless of implementation.
Tested on: sbcl, ccl, ecl, abcl, cmu, allegro.

From now on we should add characters
only with char-code to avoid errors? @vindarel

Use `char-code` for `*whitespaces*` characters.
This should prevent future problems with some
implementations that do not support specific
characters in the reader.
@vindarel
Copy link
Owner

vindarel commented Jul 2, 2024

oooh this looks wise, but we are loosing a user-facing QoL.

We can easily see what's in the whitespaces variable:

str:*whitespaces*
(#\Backspace #\Tab #\Newline #\Newline #\Vt #\Page #\Return #\  #\Rubout
 #\Next-Line #\NO-BREAK_SPACE)

not so with charcodes.

I really like cl-str to be easily inspectable, clear, etc. Maybe there's a better way. Or we maintainers have to work harder and add some tests / a CI for the future.

@vindarel vindarel marked this pull request as draft July 2, 2024 12:24
@kilianmh
Copy link
Collaborator Author

kilianmh commented Jul 8, 2024

not so with charcodes.

Is it? I get the same result with this PR when putting str:*whitespaces* in the repl.

Also there are comments after every character-code with the respective character.

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.

2 participants