Type Inference for Struct/Enum Literals
IchorDev
zxinsworld at gmail.com
Tue Jul 9 03:10:47 UTC 2024
On Monday, 8 July 2024 at 17:56:01 UTC, Quirin Schroll wrote:
> Considering how `$` is used in D, that is weird. Given that we
> have `this.x` in a class, why not `module.x` for “global” (i.e.
> module-scope) stuff?
This is a very clever idea, especially since the `module` keyword
is not currently utilised outside the module declaration, and
people don't often need the module scope operator to begin with.
On the other hand, `enum` is already used for a few things, and
it's a bit long, making it . Not a terrible idea, but it lacks
the elegant simplicity of `.`. And what's the point of replacing
module scope op with `module` if we don't re-use `.` anyway?
All of this is still breaking syntax though, which more people
than ever seem to be against now that we're about to have syntax
backwards compatibility.
More information about the dip.ideas
mailing list