On Saturday, 5 May 2012 at 23:41:52 UTC, Mehrdad wrote:
That's *such* a lame question...

Even if I _couldn't_ tell you a reason, that'd still be a lame
question, because the *entire point* of reflection is to access
type information information about the program... if for nothing
other than printing it out for the user.

But it's more than that: it's the same darn reason why you need
to distinguish between
void* and HWND -- it's an ERROR!

In other words, this must NOT compile!

auto call(F, T...)(F func, T args) { return func(args); }
void test(uint) { }
void main() { call!(typeof(&test), size_t)(&test, 1); }

If you're still asking "why shouldn't it compile" then you should
look up what "type safety" means.


That doesn't compile on x86_64.

The point of size_t is to be the native word-sized integer for
the platform, and it does exactly that.

Reply via email to