Re:Implementing a Type-safe printf in Rust
by lmm on Friday August 14, 2020 @03:25AM
(#24154870)
It'd be worth reusing the HList (and the macro for instantiating it) from frunk rather than making a custom HList type.
(This is how the Scala ecosystem ended up working with records; technically the language doesn't have proper record types, but the whole ecosystem uses Shapeless to the extent that IDEs and other tooling are expected to understand the Shapeless macro, so de facto it does)
Re:Implementing a Type-safe printf in Rust
by kelnos on Friday August 14, 2020 @04:22AM
(#24155289)
Pretty sure that's what the author was doing. The quick HList implementation shown in the post was just to explain what HLists are; the author later mentions (and presumably uses) frunk.
(This is how the Scala ecosystem ended up working with records; technically the language doesn't have proper record types, but the whole ecosystem uses Shapeless to the extent that IDEs and other tooling are expected to understand the Shapeless macro, so de facto it does)