comby-tools / comby

A code rewrite tool for structural search and replace that supports ~every language.
https://comby.dev
Apache License 2.0
2.38k stars 61 forks source link

Selecting identifiers for change specifications #314

Open elfring opened 2 years ago

elfring commented 2 years ago

Changes are directly specified together with match operators for rewrite expressions so far. I suggest to connect such change specifications to identifiers. The identifiers can be reused then at various places. How do you think about to extend the software functionality in such a design direction? :thinking:

rvantonder commented 2 years ago

I'm not sure I understand the suggested proposal. I think I would need a specific or instructive example to understand it. Even so, like I mentioned, I have limited time to spend on growing comby in various directions. Currently, it is probably best to use comby as-is, since it's unlikely that I can introduce richer purpose-built functionality for requests.

elfring commented 2 years ago

I suggest to choose names for known transformation patterns. Selected names can be reused instead of repeating code rewriting specifications, can't they? :thinking: