You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This catalog of refactorings aims to improve the quality of code developed in Elixir, helping developers promote the redesign of their code, making it simpler to understand, modify, or even improving performance.
Overall I feel the sentiment in the community is established to prefer aliases over imports for the reasons described in the remove import refactoring.
The text was updated successfully, but these errors were encountered:
Here we revisit some points that I mentioned in the response to the other issue. A catalog of refactorings doesn't dictate rules about what is right or wrong; everything depends on the application context, which should be evaluated by the developers themselves. A catalog is like a toolbox: the choice of which tool to use is up to the user.
The example you found contradictory, of one refactoring being the inverse of another (Introduce import and Remove import attributes), is common in catalogs of refactorings, including Fowler's. For instance, Inline Method and Extract Method, which are two of the most traditional refactorings, are inverse of each other. In the catalog of refactoring we are proposing, this happens among many others as well.
Overall I feel the sentiment in the community is established to prefer aliases over imports for the reasons described in the remove import refactoring.
All refactorings in the catalog were extracted from distinct sources, such as scientific articles, the 10 most popular Elixir repositories on GitHub, and publications from grey literature (often created by members of the Elixir community). At no point did we 'invent' a refactoring. As we conduct the survey, evaluations like the relevance of each refactoring will greatly help us quantify community perceptions. Therefore, it may be that within a few weeks, this feeling of yours will be confirmed (or not). 😄
I see that
At the same time Introduce import explicitly calls out that it's a reverse of Remove import which is confusing.
Overall I feel the sentiment in the community is established to prefer
aliases
overimports
for the reasons described in the remove import refactoring.The text was updated successfully, but these errors were encountered: