C++ pattern matching is coming
rikki cattermole
rikki at cattermole.co.nz
Mon Oct 24 22:16:11 UTC 2022
On 25/10/2022 11:04 AM, Walter Bright wrote:
> On 10/24/2022 2:13 PM, rikki cattermole wrote:
>> We have this sort of behavior in the language already i.e. shared. Why
>> is lifetime tracking any different?
>
> I deliberately avoided making scope a type qualifier.
>
> My concern with a complex type structure is (besides the combinatorial
> explosion) people will just find it too complicated to use.
My concern is that memory owners simply cannot expose their owned memory
without the possibility of logic errors & segfaults.
A good recent example:
https://dlang.org/changelog/2.101.0.html#borrow_for_refcounted
Ultimately the owner must come first, regardless of what the caller
wants if we want this to be safe.
> What a relief it was to be rid of near and far pointers.
Oh I bet.
I'm glad I have never needed to use them.
More information about the Digitalmars-d
mailing list