8000 reomove tiny utilities, note that we want the core library to have useful functions not tiny wrappers by bobzhang · Pull Request #2273 · moonbitlang/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

reomove tiny utilities, note that we want the core library to have useful functions not tiny wrappers #2273

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

Merged
merged 1 commit into from
Jun 15, 2025

Conversation

bobzhang
Copy link
Contributor

No description provided.

Copy link
Missing deprecation messages for several functions

Category
Maintainability
Code Snippet
Line 25, 122, 141, 157:
#deprecated
Recommendation
Add descriptive deprecation messages explaining the recommended alternative, similar to fst() and snd()
Reasoning
Clear deprecation messages help developers understand how to migrate their code. Functions like pair(), swap(), curry(), and uncurry() are marked as deprecated but don't provide guidance on alternatives.

Interface file (.mbti) and implementation file (.mbt) deprecation annotations mismatch

Category
Correctness
Code Snippet
tuple.mbti:
#deprecated
fn[T, U, V, W] map_both((T) -> U, (V) -> W, (T, V)) -> (U, W)
Recommendation
Add the missing #deprecated annotation for map_both() in both .mbt and .mbti files to maintain consistency
Reasoning
The interface file shows map_both() as deprecated, but this annotation is missing in the implementation file. This inconsistency could lead to confusion.

Documentation should be updated to reflect deprecation status

Category
Maintainability
Code Snippet
Lines 17-23:
/// # Example
/// /// let tuple = pair(1, 2) /// assert_eq(tuple, (1, 2)) ///
Recommendation
Add deprecation notices to the documentation comments, showing both the old way and the recommended new way
Reasoning
While the functions are marked as deprecated, the documentation examples don't reflect this status or show developers the preferred alternative syntax. This makes migration more difficult.

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 7285

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.005%) to 93.106%

Totals Coverage Status
Change from base Build 7283: -0.005%
Covered Lines: 8576
Relevant Lines: 9211

💛 - Coveralls

@bobzhang bobzhang merged commit a5572f1 into main Jun 15, 2025
9 of 12 checks passed
@bobzhang bobzhang deleted the hongbo/remove_wrappers branch June 15, 2025 11:21
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
0