bietroi
Joined 3 years ago
Karma
24
Submissions
9
Member since
Aug 4
Joined 3 years ago
The glowstick shape is also a type-level list of integers, and I could definitely see how other shapes might be useful in different situations.
Doing this sort of thing in Rust is a bit of a stretch for sure, but it makes the outcome easy to apply which is nice.
That being said, it seems reasonable that you could make some optimizations like this if you had deeper integration of these types with a framework or similar. It's not something I've explored personally, sounds interesting though.
In retrospect, if I cared about getting peoples' attention I should have mentioned something about "static reflection", or positioned this as more of a direct "threat" to macro expansion (and made it opt-in instead of opt-out, I forgot how frightened people are by any new ability to infer things).
I'm just a coder, not an influencer, though I do have one additional change in mind which borders on sensationalism.