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

> (Can’t wait until we can have variadic generic parameters!)

This.



It's a genuinely hard problem. There are proposals for Rust, but nothing actionable. Catching up with all the other cool things takes precedence. (side-note: Rust dodged the problem by using macros. As a C++ guy, I was a little uneasy with this, but they're _mostly_ hygenic)


Out of curiosity, what are the non-hygienic parts are of Rust macros? I'm pretty sure that non-procedural macros are hygienic, although I don't know a whole lot about the implementation of procedural macros.


Quoting the subreddit the other day:

> Nothing except local variable names (and nested macro capture names) is hygienic in macro_rules in fact.

It's a thing that's being fixed in the new macro systems, yeah.


Could you mention a genuine use case for variadic generics that's not “working around the stupidity of not reusing tuple types for so-called ‘n-ary’ procedures”?




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

Search: