[Issue 8616] Make pointers dereference with UFCS like they do with member functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 3 23:20:01 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8616



--- Comment #3 from Maxim Fomin <maxim at maxim-fomin.ru> 2012-09-03 23:20:34 PDT ---
(In reply to comment #2)
> > The problem is that with this approach pointers are implicitly dereference
> Which is what happens when calling member functions on pointers to structs
> (unless no member variables are ever used within the function, so no
> dereferencing is necessary), so I don't see that as a problem.

Well, if pointers are dereferenced in case of accessing members, then the
problem already exists and can't be reason for not accepting enhancement
proposal.

However, there is still a question what to do when both function are available:
foo(T* ptr, ...);
foo(T val, ...);

I prefer to see the former to have priority over the latter. It may be useful
in cases when the first one was written intentionally for e.x. to check for
null pointer.

-- 
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