-
Notifications
You must be signed in to change notification settings - Fork 94
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
[gh-1117] add math modules. #2259
[gh-1117] add math modules. #2259
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
|
||
/// This module holds shared implementation of macros used in `std` | ||
module std::macros { | ||
public macro fun num_max($x: _, $y: _): _ { |
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.
Do macros support arguments of arbitrary types?
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.
See the above doc.
Type inference holes _ on type annotations
With type directed programming, often you need to annotate a variable declaration or provide type arguments. But, sometimes you really only need to annotate on specific type, but the other types can be inferred. _ will be added to allow that type to still be inferred, even when other parts of the type are annotated. For example
dynamic_field::borrow_mut<address, Coin>(&mut id, owner)
could be rewritten as
dynamic_field::borrow_mut<_, Coin>(&mut id, owner)
where the _ would be inferred as address
Rooch move do not support macros yet. |
Is there a way to support the 2024 macros version or we back to the one without macros? |
Back to the one without macros. |
559ffc9
to
0af29f2
Compare
0af29f2
to
5743da7
Compare
140f747
to
d10aa3f
Compare
I have submitted the ones without macros. |
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.
Needs some testcase.
d10aa3f
to
e42863f
Compare
Added. |
d50da22
to
a1955e3
Compare
cc7e560
into
rooch-network:main
Summary
Add move math modules
u8
,u16
,u32
,u64
,u128
,u256
.