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

struct Node<'a, 'b, 'c> { data1: &'a Data data2: &'b Data data3: &'c Data }

Wow. It's like teaching C++ and starting from SFINAE. Or C# and starting from type parameter constraints.

Please think of a real-world examples when teaching stuff. I am very eager to see the program a beginner would need to write that requires: 1) references in a struct; 2) 3 separate lifetime parameters for the same struct.



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

Search: