Skip to content

Deprecation and fixes of old or misleading API functions - #50

Merged
mokiat merged 4 commits into
masterfrom
code_cleanup
Apr 23, 2026
Merged

Deprecation and fixes of old or misleading API functions#50
mokiat merged 4 commits into
masterfrom
code_cleanup

Conversation

@mokiat

@mokiat mokiat commented Apr 20, 2026

Copy link
Copy Markdown
Owner

Changes

  • Deprecates gog.PtrOf. New code should use Go's built-in new function.
  • Introduces new Empty<DataStruct> and Preallocated<DataStruct> functions in ds package. The old usage of New<DataStruct>, which expected an integer was unintuitive and annoying when an empty one was needed. The new namings should be more descriptive. The old New<DataStruct> functions have been deprecated in favour of the new ones.
  • BREAKING CHANGE: Changes the behavior of an empty Or filter - it now returns false, which is the correct behavior.

@mokiat

mokiat commented Apr 20, 2026

Copy link
Copy Markdown
Owner Author

@Bo0mer , I'd love to get your feedback on this, since it is more disruptive than what I usually introduce.

@mokiat mokiat changed the title Code cleanup Deprecation and fixes of old or misleading API functions Apr 20, 2026
@mokiat
mokiat merged commit 7a64da6 into master Apr 23, 2026
1 check passed
@mokiat
mokiat deleted the code_cleanup branch April 23, 2026 18:42
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