--- Comment #9 from klickverbot <> 2012-06-21 14:34:32 PDT 
(In reply to comment #7)
> This example has been around a long time, and I've been telling people that
> that's the way to do it. I'm really reluctant to break it, and there doesn't
> seem to be an obvious other way to do it.

Just use typeof(U.init * V.init).

The idea might have seemed nice originally, but I think it has to go the 'bit'
route. At least in my opinion, allowing types to be used in place of
expressions is one of the most confusing things you can do to the poor
programmers out there. I recall stumbling over strange behavior is(typeof(…))
several times in the past, and this might have well been the reason.

What's more, is this interpretation backed by the spec in any way? If not, I
can hardly imagine that any alternative frontend would implement typeof() like

To restate my point, typeof(<code>) acting differently than just <code> is a
huge source of confusion (constant folding and apparent null pointer
dereferences in typeof() can be bad enough already). There would have to be a
very good excuse not to remove this special case.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to