News for hackers. Stuff that matters.
Re:Google broke a conditional statement that verifies passwo... by gpderetta on Friday July 23, 2021 @05:02AM (#27928666)
Much more usefully, in C++ you can also parametrize over templates, which I think you still can't in rust.

You can't parametrize over namespaces (at least not directly) which is an annoying and arbitrary restriction.

Re:Google broke a conditional statement that verifies passwo... by account42 on Friday July 23, 2021 @08:35AM (#27929969)
> You can't parametrize over namespaces (at least not directly) which is an annoying and arbitrary restriction.

It's not a restriction, namespaces are neither types nor values so they would need specific support. Given that you can (ab)use classes with static members as namespaces which are also a type it's simply that nobody cared enough to add support for templating over real namespaces.

Re:Google broke a conditional statement that verifies passwo... by gpderetta on Friday July 23, 2021 @09:31AM (#27930441)
You are right it is not a restriction in the sense that is explicitly disallowed; what I meant is that it would take very little to add support for parametrizing over namespaces.

Stateless structures are a workaround (so is adl driven by a template parameter), still direct support would be nice.