Am I evil for this?

Timon Gehr timon.gehr at gmx.ch
Sat Oct 15 12:41:05 UTC 2022


On 15.10.22 08:59, Walter Bright wrote:
> On 10/14/2022 6:11 PM, rassoc wrote:
>> Raku (formerly Perl 6) is very interesting in that regard. They not 
>> only allow you to define custom operators, but also specify their 
>> precedence and associativity right in the function signature.
> 
> Doing that means the code cannot be successfully parsed without semantic 
> analysis. One goal of D was to be able to keep the lexing, parsing, and 
> semantic analysis as distinct passes.
> 

You can parse it as a single "operator expression" and resolve 
precedence during semantic analysis.


More information about the Digitalmars-d mailing list