Skip to content

Conversation

tyt2y3
Copy link
Member

@tyt2y3 tyt2y3 commented Aug 2, 2025

Just tweaking the Array interface.
Well, I originally meant to add jiff support too, but it was already added!

## PR Info

Add constructor methods for `Value`

## New Features

- [x] Add constructor methods for `Value`
@tyt2y3
Copy link
Member Author

tyt2y3 commented Aug 2, 2025

I realised there is no easy way to construct an Array(None), so have to add another constructor.

@tyt2y3 tyt2y3 requested a review from Expurple August 2, 2025 11:47
Copy link
Member

@Expurple Expurple left a comment

Choose a reason for hiding this comment

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

I'd try to utilize From as much as possible, instead of inherent constructors

@tyt2y3
Copy link
Member Author

tyt2y3 commented Aug 4, 2025

we can add some From impl for Option<T> as well, but we wouldn't be able to impl them for generic Into<Option<T>>.

Edit: having thought about that actually there aren't many types that automatically impl Into<Option<T>> other than Option<T> itself?

@Huliiiiii
Copy link
Member

Huliiiiii commented Aug 6, 2025

We can implement the From trait manually for most concrete types. But sometimes users still needs to call into manually.

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.

3 participants