Dlist and dip1000 challenge
Steven Schveighoffer
schveiguy at gmail.com
Fri Oct 26 13:58:15 UTC 2018
On 10/26/18 6:17 AM, Walter Bright wrote:
> On 10/25/2018 2:12 PM, Steven Schveighoffer wrote:
>> What I can't figure out is why I'm passing a string to the allocation
>> function, which is allocating a new node on the heap containing the
>> string, but it seems to want to say this should be scope. Both the
>> string and the new node shouldn't be scope.
>
> Can you boil this down to the minimum?
I did: https://run.dlang.io/is/6xDFnr
>> I'm OK with the PR you linked, I just have no idea how to review it,
>> as I'm not a DMD developer.
>
> One of my ongoing goals is to make DMD easier to understand.
> Unfortunately, when it does get easy, people then feel comfortable
> adding complexity until it is no longer understandable. I suspect this
> is one of those immutable laws like the Peter Principle:
>
> https://en.wikipedia.org/wiki/Peter_principle
>
> I.e. all software is doomed to be incomprehensible. I'll still struggle
> against that, though :-) Currently I've been doing some refactoring to
> replace Visitor traversals with switch statements. I find the latter
> much simpler to understand, for the simple (!) reason that it has no
> dependency on an external thing like the Visitor base class.
Part of my lack of understanding is my lack of effort to try and
understand it. Until then, I really can't say what would make it better
or not.
But when sitting next to knowledgable people at dconf this year, it was
relatively straightforward to find where I had to change things for my
first dmd PR. It's like driving around a strange neighborhood with a
local who knows all the back roads.
I need to revisit your talk from 2016.
-Steve
More information about the Digitalmars-d
mailing list