3 ms·
Also, the ability to add template specifiers to implementations is probably the most powerful restricted generic programming technique I've seen. For example, i
by webkike 11y ago
Also, the ability to add template specifiers to implementations is probably the most powerful restricted generic programming technique I've seen. For example, it fills me with joy to be able write lines like this:
// Colliders are bi-directional
impl<T, K> Collider<T> for K where T: Collider<K> {
fn intersect(&self, other: &T) -> Option(Contact) {
other.intersects(self)
}
}
- stevedonovan 11y agoAs a professional C++ developer, this makes me jealous ;) Waiting for Concepts has become a Duke Nukem meme.