On Tue, 13 Jan 2015 18:35:15 +0000
aldanor via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
wrote:

> I guess two of my gripes with UFCS is (a) you really have to use 
> public imports in the modules where the target types are defined 
> so you bring all the symbols in whether you want it or not (b) 
> you lose access to private members because it's not the same 
> module anymore (correct me if I'm wrong?). Plus, you need to 
> decorate every single free function with a template constraint.
you can make a package and set protection to `package` instead of
`private`, so your function will still be able to access internal
fields, but package users will not. this feature is often missed
by the people who are used to `public`/`protected`/`private` triad.

Attachment: signature.asc
Description: PGP signature

Reply via email to