food for thought - swift 5 released - bottom types, string interpolation, and stuff.

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Apr 12 14:00:40 UTC 2019


On 4/12/19 12:32 AM, Mike Franklin wrote:
> On Friday, 12 April 2019 at 04:19:19 UTC, Mike Franklin wrote:
> 
>> And what do you have to say about this gem? 
>> https://github.com/dlang/dmd/blob/4c65b8726a66314e12ad1cad66b099d358e7165d/src/dmd/optimize.d#L62-L65 
>>
> 
> ```
> Expression nullReturn()
> {
>      return null;
> }
> 
> return nullReturn;
> ```
> 
> That leaves me dumbfounded every time I see it.

Well it's a local function which drastically restricts its clowniness. 
In all likelihood appeared as a result of refactoring gotos away. Could 
safely go, but either way won't sensibly change the state of affairs.

The other you mentioned seems to be a debugging hook, which seems 
reasonable.

At any rate, we need to make progress from the 
pot-calling-the-kettle-black stance to a net positive gradient, e.g. 
pull requests that improve the codebase.


More information about the Digitalmars-d mailing list