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

Then you go “Can you multiply a duration with a number? No, that wôuld be stupid. Can you multiply a duration with a duration? Heck yeah!” Such an intelligent type system.


Hmm? std::time::Duration doesn’t implement Mul<Duration>, and does implement Mul<u32>, and has methods mul_f32 and mul_f64. So you can multiply a duration with a number; and you can’t multiply a duration with a duration because that would be stupid.


I was talking about Go.


Oh wow, that is nasty.




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

Search: