Discussion Thread: DIP 1044--Enum Type Inference--Community Review Round 1

Dukc ajieskola at gmail.com
Sat Nov 19 08:48:54 UTC 2022


On Friday, 18 November 2022 at 19:33:05 UTC, H. S. Teoh wrote:
> On Fri, Nov 18, 2022 at 07:14:14PM +0000, IGotD- via 
> Digitalmars-d wrote:
>>
>> The $myEnum syntax is really hideous compared to the .myEnum. 
>> The
>> .myEnum syntax feels natural where $myEnum looks like it is 
>> some kind
>> macro parameter or something. There is a reason that all other 
>> example
>> languages like Swift use the . syntax.
>
> Yeah, `$` is really hideous and sticks out like a sore thumb in 
> typical
> D code.  On top of that, it overloads the current usage of $ to
> something completely unrelated, which makes it look really 
> messy.  Why
> can't we just stick with `.`?

(He / She)? gave a good reason, that already means "fetch from 
module namespace". While we could devise rules to make those 
disambiguate from each other, it'd be too much complexity for 
slightly better-looking syntax IMO.

I thus prefer `$`. However, Timons idea, `_`, is even better.




More information about the Digitalmars-d mailing list