Now that the dmd backend is in D...?
Exil
Exil at gmall.com
Fri Aug 2 00:09:04 UTC 2019
On Thursday, 1 August 2019 at 23:54:28 UTC, Walter Bright wrote:
> On 8/1/2019 4:05 PM, Exil wrote:
>> On Thursday, 1 August 2019 at 20:24:12 UTC, Walter Bright
>> wrote:
>>> and is reasonably in sync with DMD. However, having endured
>>> multiple grand reshufflings of the DMD source code, and
>>> having recently headed off yet another one, I'm not much in
>>> favor of it.
>>
>> So D suffers and can't make any significant changes to the
>> backend in order to accommodate an old dead project that isn't
>> being actively developed?
>
> In my not-so-humble experience, shuffling code about is too
> easy, usually an illusion of progress (look ma! I changed lots
> of lines of code!).
Who said it was for "progress"? Don't paint it as something it
isn't. It's usually about maintainability and readability.
Something the backend lacks. Lack of comments, horrible naming
convention, etc... With documentation like this:
/*****************
* Free code
*/
void code_free(code *cstart)
> Refactoring to improve the design and flow of the code is much
> harder, usually requiring a thorough understanding of the code.
> Switching the backend to using CodeBuilder is an example of
> such.
There's more to it than that. I once had to refactor a monolithic
class. It had dozens of functions that it really shouldn't have.
I didn't write the code, someone else did and other developers
over the years kept adding onto it until it got to the state it
was in. It was first easier to -reshuffle- refactor the code into
separate files to better understand how it works and to decouple
everything. It made the code more readable and easier to
understand, and from there to easily be redesigned into
appropriate.
Kind of like how when you go from C -> D, rather than rewriting
it in idiomatic D straight away, it is easier and reduces bugs to
do a direct conversion from C to D. I think this is something you
should be familiar with.
More information about the Digitalmars-d
mailing list