Skip to content

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

Draft
kilianmh wants to merge 1 commit into
vindarel:masterfrom
kilianmh:fix/whitespace-char-codes
Draft

Fix: char-code for *whitespaces* characters#123
kilianmh wants to merge 1 commit into
vindarel:masterfrom
kilianmh:fix/whitespace-char-codes

Conversation

@kilianmh
Copy link
Copy Markdown
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.
@kilianmh kilianmh force-pushed the fix/whitespace-char-codes branch from 368861d to 14ed12f Compare June 30, 2024 14:42
@vindarel
Copy link
Copy Markdown
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
Copy Markdown
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