UFCS doesn't work in some cases

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Sep 9 11:46:22 PDT 2014


On Tue, 09 Sep 2014 17:58:14 +0000
Danyal Zia via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:

> Case # 1: When the functions for UFCS are defined inside main 
> scope
UFCS is not working for nested functions. this is not a bug, it was
designed this way. the same for 'with', i believe.

> oversights/bugs? Or is their any rationale behind the decision to 
> not implement UFCS for them?
there is rationale. see http://dlang.org/function.html, UFCS section.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20140909/475bc247/attachment.sig>


More information about the Digitalmars-d-learn mailing list