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

[Feature Request][mojo-stdlib] Add "_" as a words separator to methods in TargetInfo #457

Open
gryznar opened this issue Jul 15, 2023 · 1 comment
Labels
mojo-repo Tag all issues with this label mojo-stdlib Tag for issues related to standard library

Comments

@gryznar
Copy link
Contributor

gryznar commented Jul 15, 2023

Recently methods from TargetInfo:

  • alignof,
  • bitwidthof,
  • simdwidthof,
  • simdbitwidth,
  • simdbytewidth,
  • sizeof

were normalized to remove "_" from them.
However this convention hurts readability in my opinion. Everything just blends together. Compare:

  • simdwidthof
  • simdbitwidth
  • simdbytewidth

It is not easy do determine which of those 3 was used at first glance.

I propose to add "_" as a word separator. Total length won't be increased so much (at most 2 chars), but readability "at first glance" will increase a lot.

Most methods in Mojo also have separated words, so here is no big reason for exception, especially due to the fact, that mostly 3 words are combined.

@gryznar gryznar changed the title Add "_" as a words separator to methods in TargetInfo [Feature Request] Add "_" as a words separator to methods in TargetInfo Aug 9, 2023
@gryznar
Copy link
Contributor Author

gryznar commented Sep 7, 2023

Bumping up. This will be also more consistent with the nqming convention in other packages

@JoeLoser JoeLoser added the mojo-stdlib Tag for issues related to standard library label Feb 21, 2024
@JoeLoser JoeLoser changed the title [Feature Request] Add "_" as a words separator to methods in TargetInfo [Feature Request][mojo-stdlib] Add "_" as a words separator to methods in TargetInfo Feb 21, 2024
@ematejska ematejska added the mojo-repo Tag all issues with this label label Apr 29, 2024
@ematejska ematejska removed the mojo-stdlib Tag for issues related to standard library label May 3, 2024
@ematejska ematejska added the mojo-stdlib Tag for issues related to standard library label May 3, 2024 — with Linear
@ematejska ematejska removed the mojo-stdlib Tag for issues related to standard library label May 6, 2024
@ematejska ematejska added the mojo-stdlib Tag for issues related to standard library label May 6, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mojo-repo Tag all issues with this label mojo-stdlib Tag for issues related to standard library
Projects
None yet
Development

No branches or pull requests

3 participants