Enum literals, good? bad? what do you think?

Paul Backus snarwin at gmail.com
Fri Jul 23 14:53:00 UTC 2021


On Friday, 23 July 2021 at 01:09:31 UTC, Walter Bright wrote:
> For the rvalue, this becomes "top down" type inference, as 
> opposed to the usual "bottom up" type inference. D is 
> exclusively "bottom up", as it is much simpler.

D is mostly "bottom up", but there are a few corner cases [1] 
where it isn't, and they can lead to some very confusing errors 
[2].

It would probably be too disruptive to deprecate existing 
instances of "top down" type inference in D, but we can at least 
avoid adding new ones.

[1] 
https://forum.dlang.org/post/mnxksewxtrwlxeaazvwe@forum.dlang.org
[2] 
https://forum.dlang.org/thread/xkgpheuhohbffzgdbqhb@forum.dlang.org


More information about the Digitalmars-d mailing list