Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The part that says `T<i32>`. GATs don't allow you to do that, not directly. GATs allow you, as said by Boats in https://news.ycombinator.com/item?id=33506540, have a generic type as an associated type, nothing less, nothing more. If you want to express `T<i32>`, GATs _enables_ you to do that as a kind of a distorted encoding, but it's not as simple as https://news.ycombinator.com/item?id=33505810 makes it seem.


Bring able to abstract over Rc/RefCell and Arc/Mutex with marker types seems pretty useful. It's not directly HKT but it enables use cases that would otherwise be supported by HKT.


Yes, but that doesn't make it somehow accurate to explain HKT and pretend you're explaining GAT...


That is definitely true.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: