units icon indicating copy to clipboard operation
units copied to clipboard

Enhancement request

Open kunaltyagi opened this issue 5 years ago • 3 comments

I've been poking and prodding this library and it has a lot of features that are hidden to the user by mentioning them in the passing (or in the extended documentation, which unfortunately doesn't cover all basis mostly because it is generated via doxygen).

  • SI prefixes in the literals: easily exposed to user by modifying the README
  • Literals of the many types defined (eg distance has meter, metre, m, ft, feet, foot, etc.)
  • Different base classes of units (double, float, int64, complex etc): slightly difficult for a normal user, some templated using might make this easier. Might require conversion between the types (eg: convert complex to double, or double to int to fit some use-case)

Also, abbreviation is a bit long, can we support abbv or abbrv? I frequently end up making spelling errors :smile: though Clang is a nice compiler.

Most of these things are trivial (except the third point) but I'm looking at how I can easily entice my co-workers into using this library.

I hope this gets standardized just like the date library.

kunaltyagi avatar Jul 30 '18 04:07 kunaltyagi

There's work towards the third point in #150, thought it's between many other changes. I'm thinking of splitting them out to other PRs. This is the syntax.

I've been thinking of generating the doxygen documentation to confirm what's documented and how, and submit PR for improvements towards the completion of 3.0.0. And similarly for updating the README. Now I think I should do that before and regularly.

JohelEGP avatar Jul 30 '18 17:07 JohelEGP

That's really great news (I was dreading pt. 3)

Anyway I can help?

kunaltyagi avatar Aug 03 '18 07:08 kunaltyagi

yeah the documentation is not the greatest, mostly because I suck at writing it. We've also gone through several compiler versions and c++11 -> c++17, so the docs have a little bit of all that syntax sprinkled around instead of being consistent with the latest best practices.

I think from a technical standpoint v3 is in pretty good shape, however the doc update is going to be the key driver for when it gets released. Patching it to be more useful to a new user would be really helpful (it's a mindset I can't really get into at this point). If that's not your cup of tea, keep writing issues telling us where the manual needs work.

nholthaus avatar Sep 04 '18 21:09 nholthaus