pointers, functions, and uniform call syntax
Artur Skawina
art.08.09 at gmail.com
Tue Sep 4 03:51:53 PDT 2012
On 09/03/12 20:45, Jonathan M Davis wrote:
>
> It's a perfectly valid enhancement request to want
>
> void func(S s, int i) {...}
>
> to be be callable with S*, given that normally function calls on an S* don't
> require you to dereference anything.
No, it's not. See http://d.puremagic.com/issues/show_bug.cgi?id=8490 for why
this would be a very bad idea. However 'void func(ref S s, ...){}' should (be
made to) work, at least for the UFCS case - if it already doesn't (old compiler
here...) - if 'func' is supposed to emulate a method then it should behave like
one.
artur
More information about the Digitalmars-d
mailing list