Argumnentation against external function operator overloading is unconvincing

pineapple via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 25 07:05:19 PDT 2016


On Sunday, 25 September 2016 at 13:57:04 UTC, Jonathan M Davis 
wrote:
> The way it works now is how it's always worked with dynamic 
> arrays and ranges in D. If you're trying do anything else, 
> you're just going to run into problems in the long run - 
> particularly when interacting with code written by anyone else. 
> So, while you're obviously free to do whatever you want with 
> your own code, don't expect Phobos or D code in general to 
> change how ranges fundamentally work.

That change is exactly what I'm arguing against - that the front, 
popFront, etc. functions defined for dynamic arrays in phobos 
should not be adopted by the core language.

On Thursday, 22 September 2016 at 12:51:59 UTC, Andrei 
Alexandrescu wrote:
> Would make sense to move those few primitives to object.d. I've 
> been thinking of that a long time ago but back then there was a 
> vague stance that object.d shouldn't contain templates. Since 
> then that has changed. -- Andrei

Please do not do this - there ways to handle ranges other than 
the approach phobos has taken. That's it, that's the point I'm 
trying to make.


More information about the Digitalmars-d mailing list