Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#3169): decapitalize auto named objects on converting to phi #3170

Conversation

maxonfjvipon
Copy link
Member

@maxonfjvipon maxonfjvipon commented May 6, 2024

Closes: #3169


PR-Codex overview

This PR adds licensing information and updates XML files in the project.

Detailed summary

  • Added MIT License to YAML and XSL files
  • Updated XML files with licensing info
  • Modified XSL files for XML transformation
  • Updated Java file imports and variables

The following files were skipped due to too many changes: eo-maven-plugin/src/test/resources/org/eolang/maven/packs/decapitalize-auto-named.yaml

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@maxonfjvipon
Copy link
Member Author

@yegor256 please check

@yegor256
Copy link
Member

yegor256 commented May 6, 2024

@maxonfjvipon why can't we just auto-generate names like attribute-at-XXX where XXX is the number of the line. Later, we can introduce a check that would prohibit programmers from giving similar names to their attributes, if there are conflicts.

@maxonfjvipon
Copy link
Member Author

maxonfjvipon commented May 6, 2024

@yegor256 we already have check that checks if there are more than one objects with the same name, so imagine:

[] > obj
  x > y
    [] >>
  5 > attribute-at-3

Programmer writes the code and expects it works because why not? But it fails on compilation because of the name conflict. Usability? I don't think so.
I believe it's quite strong rule to prohibit names started with capital letter and use such names on auto-generation. Because there's no any possible way to get a conflict in such case.
So my suggestion is to stick with current implementation. So what's your decision?

@maxonfjvipon
Copy link
Member Author

@yegor256 maybe you're right

@yegor256
Copy link
Member

yegor256 commented May 8, 2024

@maxonfjvipon later we can make our game-generator more powerful, so that it avoids conflicts. But making names that don't follow the grammar of the language -- this definitely is a wrong idea.

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.

Decapitalize attribute while converting to phi
2 participants