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

Characters should be unboxed #329

Closed
jcubic opened this issue Mar 5, 2024 · 0 comments
Closed

Characters should be unboxed #329

jcubic opened this issue Mar 5, 2024 · 0 comments
Milestone

Comments

@jcubic
Copy link
Collaborator

jcubic commented Mar 5, 2024

This was a mistake in #233

(let ((x (vector)))
  (x.push #\x)
  x)

It's ok for Array::push to unbox the values, and characters can be unboxed to strings.

If you want to have character vectors, you can use set-obj! on array.

(let ((x (vector)))
  (set-obj! x x.length #\x)
  x)

It should also be documented to be careful with native methods because they always unbox the values.

@jcubic jcubic added this to the 1.0 milestone Mar 5, 2024
jcubic added a commit that referenced this issue Mar 13, 2024
@jcubic jcubic closed this as completed Mar 13, 2024
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

1 participant