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

Problems in naming #436

Open
EugeneDar opened this issue Nov 28, 2022 · 3 comments
Open

Problems in naming #436

EugeneDar opened this issue Nov 28, 2022 · 3 comments

Comments

@EugeneDar
Copy link

EugeneDar commented Nov 28, 2022

https://github.com/polystat/c2eo/blob/master/project/src/transpiler/main.cpp here we have package_name variable, but I'm not sure that's true.

This variable changed only here:

package_name = filename.substr(0, filename.size() - 3);
if (package_name.rfind('/') != std::string::npos) {
    package_name = package_name.substr(package_name.rfind('/') + 1);
}

For example I would like to run c2eo <dist.c> out.eo. Then package_name will equal "out", but it's name of file, not of the package.

@EugeneDar
Copy link
Author

It seems to me that this complicates the understanding and readability of the code, at least it led me astray.

@EugeneDar
Copy link
Author

@yegor256 what do you think?

@yegor256
Copy link
Member

@EugeneDar I don't know... please, suggest an improvement (PR) and we'll ask c2eo developers to review it

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

No branches or pull requests

2 participants