DIP 1017--Add Bottom Type--Final Review

Nicholas Wilson iamthewilsonator at hotmail.com
Wed Jan 16 09:19:13 UTC 2019


On Wednesday, 16 January 2019 at 07:04:37 UTC, Neia Neutuladh 
wrote:
> There are at least five parts to this proposal:
>
> a. Add a way to indicate that a function doesn't return.
> b. Use a special return type to indicate that.
> c. Make that type implicitly convert to absolutely every other 
> type.
> d. Make it a compile error to use that type in most ways.
> e. Stop running catch/finally after assert errors, throwing 
> exceptions,
> etc. I believe this was poor phrasing instead of a real part of 
> the
> suggestion.

Thanks for this analysis.
a. already exists as an attribute for LDC and GDC.
b. as you mentioned is not well argued
c, d & e follow from a bad argument

> The proposal should be explicit about having these parts. I 
> feel like the proposal came this far with as little objection 
> as it did in part because it was not clearer.
>
> The only points that are at all defended are (a) and (b), and 
> the defense for (b) was sorely lacking.

On the contrary, there was lots of objection but no response. As 
to why it has managed to get this far through the DIP process is 
beyond me: none of the points in the draft review have been dealt 
with.

>> It's necessary to be competitive with other systems 
>> programming languages.
>
> If we add features merely because other languages do so, we are 
> claiming that the designers of those languages are authorities 
> to be blindly trusted. At that point, we can give up on the 
> language and just use Rust or C++ or whatnot.

Indeed, I have a hard time imagining that point of rationale is 
serious on nature.

> That said, it's worthwhile to examine how other languages 
> implement similar features. We can see what works for them and 
> what doesn't, and we can see how that might work for D.
>
> The fact that the DIP does not have this analysis is 
> surprising. Let me make up for this lack slightly.

Indeed, thanks for doing this.



More information about the Digitalmars-d mailing list