DMD as a library - recap, next steps

Petar Petar
Tue Jun 16 09:12:50 UTC 2020


On Tuesday, 16 June 2020 at 09:00:55 UTC, Petar Kirov 
[ZombineDev] wrote:
> On Tuesday, 16 June 2020 at 08:16:25 UTC, Stefan Koch wrote:
>> On Tuesday, 16 June 2020 at 04:13:10 UTC, RazvanN wrote:
>>
>>> - Further strip the AST nodes of functions that require 
>>> semantic analysis so that we can remove the code duplication 
>>> in ASTBase
>> The AST without SemA is useless.

BTW, I really don't get this obsession with bad OOP design in 
DMD. The AST classes should be just pure data. SemA should 
functions that operate on this data. I can't find any good reason 
why one would put the SemA *implementation* inside the AST 
classes. Just imagine if the constructor of the 
FunctionDeclaration directly outputted x86 assembly :D

So this is why I think all logic should be moved from the AST 
classes to other functions/classes/modules.





More information about the Digitalmars-d mailing list