Repository navigation
refactor: the Tuple and Option modules of FlatList call the default module by its short name - #48
Open
xperiandri wants to merge 1 commit into
Open
xperiandri wants to merge 1 commit into
xperiandri wants to merge 1 commit into
Conversation
…ault modules by their short names Each of these files opens `FSharp.Collections.Immutable`, and inside `FSharp.Collections.Immutable.Tuple.FlatList` the name `FlatList` reaches the default module, also for the functions that both modules define, so the full namespace in front of it added nothing. The compiled code is the same: the opcodes and the called methods of every method of both builds match one to one. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
FlatListTuple.fsandFlatListOption.fscall the default module withFSharp.Collections.Immutable.FlatList.f. Each of the two files opensFSharp.Collections.Immutable, and insideFSharp.Collections.Immutable.Tuple.FlatList(andOption.FlatList) the nameFlatListreaches the default module, also for the functions that both modules define, so the full namespace in front of it adds nothing. This pull request writesFlatList.f. Seven references in two files; no other change.The compiled code is the same. I compared the two builds method by method (944 methods): the opcodes and the called methods match one to one. The tests pass (5 556 test runs on net8.0 and net10.0).
The same change is on the branches of the other collections (their own
TupleandOptionfiles only), and in #31 forIndexedList.Types of changes
A style change; no behaviour or signature changes.
Checklist
Further comments
A short name is not always safe: in
FrozenSet,FrozenSet.freaches the static classSystem.Collections.Frozen.FrozenSetof the BCL and does not compile, so theFrozenSetbranch keeps the full names. Where the short name does compile, the comparison of the IL is the proof that it reaches the same function.🤖 Generated with Claude Code