[Issue 17474] non-property being treated as a property
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Fri Jun  9 19:01:32 PDT 2017
    
    
  
https://issues.dlang.org/show_bug.cgi?id=17474
Walter Bright <bugzilla at digitalmars.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com
--- Comment #4 from Walter Bright <bugzilla at digitalmars.com> ---
I'm not sure what the "right" semantics are, either, because each of the
behaviors can be justified.
But I can suggest avoiding using default function arguments. Default arguments
are a good solution for adding parameters without breaking existing code, but
are not a good practice otherwise. The behavior observed here, as well as its
interaction with overloading, are examples.
The only other thing I can think of is issuing a warning if a function with a
default argument is being used as a setter.
--
    
    
More information about the Digitalmars-d-bugs
mailing list