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

Rename fmt to parse #2

Open
hellow554 opened this issue May 7, 2021 · 1 comment
Open

Rename fmt to parse #2

hellow554 opened this issue May 7, 2021 · 1 comment

Comments

@hellow554
Copy link

I was very confused in the first place, that afmt::fmt actually is meant for parsing. When I first saw fmt I thought it would implement std::fmt::Display and I thought, hey! That's neat!

But only after looking at the sources (and reading the doc 🙃) I saw it's actually meant for parsing a string into a struct.

Maybe consider renaming the struct?
Next step would be to have a fmt macro that implements std::fmt::Display? Because that would be sick as well!

@eduardvercaemer
Copy link
Owner

I can see fmt being a little confusing, my thinking was that we are giving a 'format' to a data structure, I'll consider renaming it to parse.

I can also see the option of implementing both std::fmt::Display and std::str::FromStr.

Thanks for the feedback !

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