Argumnentation against external function operator overloading is unconvincing
pineapple via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 25 10:19:48 PDT 2016
On Sunday, 25 September 2016 at 15:25:38 UTC, Jonathan M Davis
wrote:
> So, if they want their code to work with anyone else's code
> they pretty much need to use their own set of range primitives
> that do not conflict with the standard ones rather than trying
> to redefine the standard ones. And if they don't care about
> interacting with anyone else's code, they can always just fork
> druntime and Phobos to make them do whatever they want. But
> trying to redefine some of the basic primitives that D's
> runtime and standard library use while still trying to interact
> with anyone else's code is a recipe for disaster.
>
> - Jonathan M Davis
I don't mind writing my own code rather than interacting with
someone else's, and I severely dislike many of the design
decisions made regarding phobos. Which is why I've been building
my own alternative to the standard library that I can use as a
basis for software I develop. It depends on phobos for only a
handful of things, and I'm working toward a point where I won't
need it for anything. I recognize that the preference is unusual,
but I insist on my and others' ability to pursue such a
preference.
On Sunday, 25 September 2016 at 14:50:04 UTC, Andrei Alexandrescu
wrote:
> It seems you want to define ranges with similar syntax but
> subtle semantic differences, e.g. r.front and r[0] to mean
> different things. The entire Phobos is designed under the
> assumptions that ranges work a specific way, so in order to
> design a different mechanism you may want to use different
> syntactic interfaces.
I have no problem with phobos being phobos, and treating ranges
as it does. I don't want the core language to adopt the same way
of treating ranges because while I recognize that it is far too
late to change phobos' way of thinking about ranges - much less
the community's - I think it was a mistake and that the quality
of D as a language shouldn't suffer for its sake. The core
language should define the bare minimum that it needs to for
ranges to be a useful concept - as it does now - and should leave
the rest up to phobos or whatever else is actually implementing
the ranges.
On Sunday, 25 September 2016 at 14:50:04 UTC, Andrei Alexandrescu
wrote:
> I speculate this has to do with our community being
> self-selected as opinionated folks who don't do well with
> conventional wisdom.
You have described me to a T.
More information about the Digitalmars-d
mailing list