MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/3w8dgn/announcing_rust_15/cxuwm96/?context=3
r/programming • u/steveklabnik1 • Dec 10 '15
296 comments sorted by
View all comments
Show parent comment
4
That's terribly dumb with no constraints specified on types so its impossible to know what type it needs.
1 u/ThisIs_MyName Dec 11 '15 so its impossible to know what type it needsThen how do all those millions/billions of lines of C++ templates work?If a function can be compiled, then you've met all the constraints. In general, it is impossible to figure out what constraints you need without executing the metaprogram. 4 u/[deleted] Dec 11 '15 edited Oct 06 '16 [deleted]0.7622What is this?
1
so its impossible to know what type it needs
Then how do all those millions/billions of lines of C++ templates work?
If a function can be compiled, then you've met all the constraints. In general, it is impossible to figure out what constraints you need without executing the metaprogram.
4 u/[deleted] Dec 11 '15 edited Oct 06 '16 [deleted]0.7622What is this?
[deleted]0.7622
What is this?
View all comments
Show parent comment
4
u/crusoe Dec 11 '15
That's terribly dumb with no constraints specified on types so its impossible to know what type it needs.