Mihaela Chirea - SAOC 2020 Milestone 1 Update 4 - Improving DMD as a Library
Sönke Ludwig
sludwig at outerproduct.org
Wed Oct 21 06:55:45 UTC 2020
Am 21.10.2020 um 04:01 schrieb RazvanN:
> On Monday, 19 October 2020 at 17:37:46 UTC, Sönke Ludwig wrote:
>> Am 19.10.2020 um 17:59 schrieb Mihaela Chirea:
>>> While going through the token types I also noticed that TOK.arrow
>>> seems to be unused. Is there a reason for keeping it? Same for int128
>>> and uns128 but I thought those might be implemented in the future. Is
>>> TOK.arrow in a similar situation?
>>>
>>
>> I think the only reason is to give a helpful error message in case
>> someone ports code from C/C++ or writes in that fashion. This is what
>> DMD outputs:
>>
>> Error: use . for member lookup, not ->
>
> Actually, at the site where that error is printed the condition utilizes
> 2 distinct tokens [1]: minus and greater than. Therefore I think we can
> get rid of Tok.arrow
>
> [1] https://github.com/dlang/dmd/blob/master/src/dmd/parse.d#L7737
You are right, should also remember to remove TOKarrow then, too.
More information about the Digitalmars-d
mailing list