You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ppkarwasz (via GitHub)" <gi...@apache.org> on 2025/06/21 02:49:06 UTC
Re: [PR] Reduce complexity of CSVParser.createHeaders() [commons-csv]
ppkarwasz commented on PR #477:
URL: https://github.com/apache/commons-csv/pull/477#issuecomment-2993271182
Hi @sigee,
Thanks for the PR. After reviewing the proposed change, I'm not convinced it simplifies the current implementation. The method name `buildHeaderNames` doesn't clearly convey its purpose—namely, analyzing and processing the header record. Additionally, its design is somewhat ambiguous: it returns a value like a pure function but also mutates one of its parameters, which makes the method harder to reason about.
Overall, this change appears to increase the cognitive complexity instead of reducing it. It feels more like refactoring for refactoring's sake rather than a meaningful improvement to readability or maintainability.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org