Skip to content

Conversation

@DeadLockStarve
Copy link

Describe the pull request

Changes management of nil pointers thus solves #369 and #370. #371 unsolved because of structural issues: looking at the code we can see there that the current approach is calling a different for loop depending on the type. There seems to be a clear reason: increasing performance by reducing function calls and reflection.
However this comes at the cost of maintainability, while in this library we have duplicated normalization for slices and for single types, in other libraries like BurntSushi/toml normalization is done in a single function called for each element by the slice management loop.
What's preferred by the codebase in this case, performance or mantainability?

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code.

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.

1 participant