Skip to content

[FEATURE] Refactor Output::expand_name_ to call cello::expand_name #393

@mabruzzo

Description

@mabruzzo

Essentially, the implementations are extremely similar. I don't think it would take much effort to refactor Output::expand_name_ so that it can call cello::expand_name. You probably need to allocate a vector of strings, but I think this is probably worthwhile.

This is a great task for new developers!


If you're feeling really fancy, there are a few alternatives that avoid the heap allocation. The minimally-invasive solution involves introduces a second version of cello::expand_name that deals with more "more generalized arguments". That new version would do all of the heavy lifting and the existing version would simply call into that new version (and Output::expand_name_ would also call into the new-version). This "more generalized arguments" could

  • take pointers
  • make use of C++'s iterator-protocol

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions