Tuple DIP
Guillaume Boucher
guillaume.boucher.d at outlook.com
Wed Jun 5 23:06:19 UTC 2019
On Tuesday, 4 June 2019 at 18:02:30 UTC, Jacob Carlborg wrote:
> On 2019-06-03 19:43, Timon Gehr wrote:
>
>> This has not been discussed, but I agree it should be
>> addressed somehow. The main issue is that right now "_" is a
>> valid identifier.
>
> Can a '*' be used instead?
Not in all cases:
auto *= G(); // would be very strange if this is allowed
But it can in tuples, which is the second most relevant use case.
The most relevant use case is this one:
foreach(*;0..n) { ... }
So either there's a special case for that or we just continue
using _ in those loops (the scoping doesn't matter there). So
'*' can work, but is a bit hacky.
More information about the Digitalmars-d
mailing list