lloydmeta / frunk

Funktional generic type-level programming in Rust: HList, Coproduct, Generic, LabelledGeneric, Validated, Monoid and friends.
https://beachape.com/frunk/
MIT License
1.29k stars 58 forks source link

HList! vs Hlist! #132

Closed ExpHP closed 3 years ago

ExpHP commented 6 years ago

Since we're talking breaking changes, I'd like to throw this out there:

I mistype Hlist! as HList! almost every time I use it. Why is it named this way, and how do others feel about this?

Centril commented 6 years ago

According to the Rust API Guidelines on naming I think Hlist! is right.

ExpHP commented 6 years ago

It's like our HList trait, which is named like BTreeMap

Centril commented 6 years ago

Yeah true; according to the API guidelines BTree should be Btree; this might have been before the API guidelines time?

ExpHP commented 6 years ago

I consider the B to be a separate word. Notice that somebody else found it necessary to use b_tree_map as an antiexample in the guidelines, presumably because they perceive it as a separate word too

lloydmeta commented 6 years ago

To be honest I often get it wrong myself when using the type macro so I'm open to re-naming it. Asides from naming convention, I think I may have wanted to avoid ambiguity between the type macro and the HList trait

https://github.com/lloydmeta/frunk/blob/d0af7a234908b6a8bd550c66db3fac09c12f4f26/core/src/hlist.rs#L68