Shopping for template languages
IchorDev
zxinsworld at gmail.com
Mon Aug 12 11:47:54 UTC 2024
On Monday, 12 August 2024 at 08:58:59 UTC, cc wrote:
> I'd even lean towards excluding the `.` if at all possible but
> I assume people predict too many potential conflicts in other
> code?
It would be too ambiguous. If you write a type-inferred enum
member that has the same name as a local variable, what happens?
The fact that there’s more than one answer means that the
programmer can’t be certain without looking it up; wasting their
time to use a convenience feature. It’s variable shadowing but
with types—bleh! Having a prefix makes your intention explicit,
and later you don’t have to contemplate whether you’re looking at
a variable/function call, or type inference.
> Either way I'd definitely like to see this working as a
> preview, it's a lot easier to see if it Just Works or Just
> Doesn't to try it than to keep it forever locked in council
> session limbo.
Well you’re welcome to submit a new PR for the existing
implementation but with it locked behind a preview…
More information about the Digitalmars-d
mailing list