8000 try to fix double print in windows by Kaida-Amethyst · Pull Request #2315 · moonbitlang/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

try to fix double print in windows #2315

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

Conversation

Kaida-Amethyst
Copy link
Contributor

draft

Copy link
peter-jerry-ye-code-review bot commented Jun 23, 2025
Some examples in the documentation show operations with NaN but don't fully explain the behavior

Category
Maintainability
Code Snippet
inspect(0.0 / 0.0 != 0.0 / 0.0, content="true") // NaN != NaN
Recommendation
Add more comprehensive comments explaining NaN behavior and add a note about IEEE 754 floating-point standard compliance
Reasoning
NaN behavior can be unintuitive for developers. Adding more context about why NaN != NaN and other special cases would improve documentation quality and help prevent confusion.

Inconsistent use of decimal points in numeric literals in examples

Category
Maintainability
Code Snippet
inspect(42.0.to_int(), content="42")
inspect((-42.5).to_int(), content="-42")
Recommendation
Standardize the style of numeric literals in examples. Either consistently use parentheses for negative numbers or not: -42.5 vs (-42.5)
Reasoning
Consistent style in documentation examples makes the code more readable and helps establish coding conventions for the language.

Some examples demonstrate division by zero without proper warning comments

Category
Correctness
Code Snippet
inspect(1.0 / 0.0, content="Infinity")
Recommendation
Add warning comments about division by zero operations and explain when they might be appropriate or dangerous
Reasoning
While floating-point division by zero is defined behavior returning Infinity, it's important to warn developers about potential issues in production code.

@coveralls
Copy link
Collaborator
coveralls commented Jun 23, 2025

Pull Request Test Coverage Report for Build 7446

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.117%

Totals Coverage Status
Change from base Build 7445: 0.0%
Covered Lines: 8544
Relevant Lines: 9481

💛 - Coveralls

@Kaida-Amethyst Kaida-Amethyst force-pushed the ziyue/fix_double_print_in_windows branch from 6e98dd4 to 909e3ec Compare June 23, 2025 08:49
@peter-jerry-ye peter-jerry-ye force-pushed the ziyue/fix_double_print_in_windows branch from 909e3ec to 32953da Compare June 23, 2025 09:13
@Kaida-Amethyst Kaida-Amethyst marked this pull request as ready for review June 23, 2025 09:14
@peter-jerry-ye peter-jerry-ye enabled auto-merge (rebase) June 23, 2025 09:14
@peter-jerry-ye peter-jerry-ye merged commit bb892f7 into moonbitlang:main Jun 23, 2025
16 checks passed
@Kaida-Amethyst Kaida-Amethyst deleted the ziyue/fix_double_print_in_windows branch June 23, 2025 16:50
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
0