-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
Remove Nat
#6422
Merged
Merged
Remove Nat
#6422
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rtfeldman
force-pushed
the
remove-nat
branch
3 times, most recently
from
January 26, 2024 01:36
1e775a3
to
328a9eb
Compare
rtfeldman
force-pushed
the
list-without-nat
branch
from
January 26, 2024 20:58
cbfc92f
to
442f095
Compare
The bug reproduces if you go to the commit before this one; seems to be the problem is importing an un-exposed value as unqualified (possibly from a package, might be relevant)
rtfeldman
force-pushed
the
remove-nat
branch
from
February 13, 2024 17:51
d9aded6
to
e8a0b09
Compare
This reverts commit e8a0b09.
The usize one gets used internally for things like pattern matches. This is both more efficient (means they don't have to do unnecessary casts) and also less error-prone due to e.g. comparing length to capacity, which is usize.
rtfeldman
force-pushed
the
remove-nat
branch
from
February 17, 2024 16:37
78dfdf4
to
1568888
Compare
Seamless slices make this obsolete!
This reverts commit ad1bca4.
rtfeldman
force-pushed
the
remove-nat
branch
from
February 17, 2024 18:23
1568888
to
12aa775
Compare
Anton-4
approved these changes
Feb 19, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good :)
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Now everything in public APIs that was
Nat
isU64
instead.(In-memory data structures are the same as before; we cast to/from
usize
behind the scenes.)This also removes some builtin functions:
Str.fromUtf8Range
because seamless slices make it unnecessary (can now doList.sublist
followed byStr.fromUtf8
to get the same functionality).Num.bytesToU16
and friends - now that we have seamless slices, these shouldn't be part of builtins anymore. Explicit endianness is needed, at which point these can be done in userspace just fine.