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

cc cc at nevernet.com
Sun Nov 27 03:17:45 UTC 2022


On Friday, 25 November 2022 at 19:40:35 UTC, Nick Treleaven wrote:
> On Tuesday, 22 November 2022 at 04:17:37 UTC, IchorDev wrote:
>> On Tuesday, 22 November 2022 at 01:43:25 UTC, Timon Gehr wrote:
>> `_.member` could break existing code, sorry. :(
> I think only if someone named a variable `_`. That does not 
> seem a sensible variable name to use and any breakage of that 
> is justified IMO. I know it's sometimes used as a function name 
> for translations - though because that requires an argument I 
> think that distinguishes it from possible use for ETI.

`$_` is the default variable in perl (or was).  I can potentially 
envision people using `_` as an iterator, match result, bitfield 
padding variable, etc.  Whether that's a big enough issue worth 
worrying about, eh.  Though it does seem odd have to make the 
exception "`_` is a word character, you can use it in any symbol 
name, except by itself."  Suppose that's essentially the same 
situation for keywords, though.

Is `..` used anywhere besides slicing and `foreach`?  Just 
throwing that onto the pile, though it's probably another 
tool-breaker.


More information about the Digitalmars-d mailing list