C++ pattern matching is coming
Walter Bright
newshound2 at digitalmars.com
Mon Oct 24 22:11:36 UTC 2022
On 10/24/2022 1:50 PM, Paul Backus wrote:
> It is impossible for both of the following statements to be true simultaneously:
>
> 1. Existing @safe code can incrementally adopt @live without breaking API changes.
> 2. @live allows code to be made @safe or @trusted that could previously only be
> @system.
>
> If (1) is true, then allowing @live functions to do anything a @safe function
> could not already do would make it possible for memory corruption to occur in
> @safe code. Therefore, (2) must be false.
>
> If (2) is true, then the argument in my previous message applies, which means
> that (1) must be false.
(1) is false. @live functions come with the assumption that:
@live void foo(int* p, int* q) { ... }
will not be passed pointers to the same object.
More information about the Digitalmars-d
mailing list