do I incur a penality on compile time if I explicitly declare default behavior ?

frame frame86 at live.com
Tue Jun 22 06:58:55 UTC 2021


On Monday, 21 June 2021 at 22:56:30 UTC, someone wrote:

>> This might happen even though you wrote the actual type at the 
>> time -- sometimes library code changes the type, and just uses 
>> alias this to allow original code to compile.
>
> For what I was reading a couple of days ago while navigating 
> the general forum, alias is something very useful that should 
> be handled with care.
>
>> -Steve

Oh yeah, 'alias this' can be problematic - first time I used it 
was fine. Later with more complex code, the compiler did run into 
some recursion by parsing the code, was not able to detect that 
and just assigned the type to void and has thrown funny errors.

> Furthermore, regardless of the impact, one of the pros of 
> explicitly coding like this is to help future-portings of the 
> base code to another language

Well, your topic was about compile time ;)
Btw, some IDE can show you module import times like Visual Studio 
Code with d-code extension.


More information about the Digitalmars-d-learn mailing list