Type helpers instead of UFCS
Enamex via Digitalmars-d
digitalmars-d at puremagic.com
Sat Sep 12 13:54:05 PDT 2015
On Saturday, 12 September 2015 at 20:40:35 UTC, Adam D. Ruppe
wrote:
> On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote:
>> - code completion in IDE. It'will never work.
>
> Why not? I haven't actually tried it, but it seems like a
> pretty easy problem, except perhaps with complex templates.
>
>> - noobs, code is unreadable.
>
> meh
There's the bigger problem that extending a type via UFCS is
'open'; there can always be more functions where the first
parameter accepts that type you're using.
With a dedicated syntax, specific functions/groups-of-functions
could be easily recognized as extensions of a type and could even
be made to be recognized by templates (when the type is passed as
type parameter or alias param) even though they're not in its
definition. Kinda like type classes.
But, anyway...
More information about the Digitalmars-d
mailing list