Skip to content

chore: rename AvoidScientificNotation to UseScientificNotation#416

Merged
mwoss merged 1 commit into
masterfrom
chore/use-scientific-global
Mar 15, 2026
Merged

chore: rename AvoidScientificNotation to UseScientificNotation#416
mwoss merged 1 commit into
masterfrom
chore/use-scientific-global

Conversation

@mwoss

@mwoss mwoss commented Mar 15, 2026

Copy link
Copy Markdown
Member

As discussed in #389 (comment) we should use positive sounding variable to decrease confusion and cognitive load for end users.

@mwoss mwoss merged commit 400829b into master Mar 15, 2026
6 checks passed
@mwoss mwoss deleted the chore/use-scientific-global branch March 15, 2026 22:07
Comment thread decimal.go
// digits are unknown. With this set to false, that number would be expressed as "1.2E3" instead.
var AvoidScientificNotation = true
// digits are unknown. With this set to true, that number would be expressed as "1.2E3" instead.
var UseScientificNotation = false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm worried about this PR

A public variable name was renamed, which mean it's a breaking change in the API.

There are code out there that will stop working.

The variable could have been kept with a //Deprecated: tag

I don't think it's a real issue because the last published tag doesn't contain the old variable yet.

But I wanted to share my surprise.

I'm curious about your feedback here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, this is a breaking change, but this variable was added between the 1.4.0 release and the next upcoming release. I was fine with doing it just because of that, otherwise I would not touch it under any circumstances

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants