[Issue 5328] The addressof-expression that should be rejected is accepted
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Dec 6 23:36:45 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5328
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clugdbug at yahoo.com.au
--- Comment #2 from Don <clugdbug at yahoo.com.au> 2010-12-06 23:35:07 PST ---
(In reply to comment #1)
> It's a feature, not a bug. You can take the address of methods without
> providing an object reference (i.e. no this pointer, or what would be the
> context member of method delegates).
> What is happening here is that the language "designers" just didn't feel like
> introducing a dedicated separate function type for this purpose. Instead, they
> reused the "normal" function pointer type, even if calling it makes no sense.
> Basically it's a quick language hack that endangers type-safety and confuses
> users.
Are you sure this is an intentional design decision, and not just an oversight?
Was it discussed by Walter and Andrei in the newsgroup?
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list