Flatten a range of static arrays
Steven Schveighoffer
schveiguy at gmail.com
Sun Feb 9 02:06:15 UTC 2020
On 2/8/20 1:20 PM, ag0aep6g wrote:
> On 08.02.20 15:57, Steven Schveighoffer wrote:
>> This kind of stuff is so difficult to reason about and develop as a
>> library that people will just end up removing dip1000 from their
>> compilation.
>
> I 100% agree that DIP 1000 is hard to reason about. It's pretty limited
> by design, and the implementation has so many bugs. If anyone has a
> better design (and implementation), I'd be all for that.
I unfortunately don't. I suspect that making scope a type constructor
might help, but I don't know enough about how dip1000 works to know for
sure.
I like the idea of dip1000 inferring most things. But the end result of
joiner just getting inferred @system is so difficult to figure out why.
I think before dip1000 is the default, we need some way to say, I expect
inference to infer these calls as safe. And it should tell you why it can't.
>
> About just ditching the compiler switch: Then you can't even take the
> address of a local. Also, it's going to become the default eventually.
Then the user will just switch to @trusted. I mean to have to figure out
what joiner is actually doing, in conjunction with map, like you did, is
so convoluted, nobody is going to spend that time. The easier thing is
to give up and switch to system where you have to.
I don't feel dip1000 is ready for the default mode until we have better
ways to diagnose its issues, and concrete responses to things that
really should be safe but aren't.
-Steve
More information about the Digitalmars-d-learn
mailing list