Feedback on Átila's Vision for D

Sebastiaan Koppe mail at skoppe.eu
Wed Oct 16 15:02:25 UTC 2019


On Wednesday, 16 October 2019 at 13:07:30 UTC, Paul Backus wrote:
> On Wednesday, 16 October 2019 at 06:53:37 UTC, Sebastiaan Koppe
>> If anything, you could simply count the && and the ||'s. That 
>> is, A && B > B. That ought to be a simple AST+lookup 
>> operation. Right?
>
> Template bodies may be arbitrarily complex, and determining 
> whether one template predicate implies another is 
> halting-equivalent in the general case.

If it would halt on your templates, wouldn't the compiler also 
halt compiling them in the first place?

But I wouldn't go as far as actually evaluating them, just look 
at the symbols.

That would probably result in A || B > B regardless of whether A 
is false or not. But then again why would you write such 
overloads?

Might be a nice project to try to solve with dmd as a library or 
libdparse, to see if it is more than just an idea.


More information about the Digitalmars-d mailing list