October 26, 2018 Re: Dlist and dip1000 challenge | ||||
---|---|---|---|---|
| ||||
Posted in reply to jmh530 | On 10/26/2018 6:47 AM, jmh530 wrote:
> Maybe there is scope for someone to write a tool that lowers all of the complicated features to simpler constructs, complementing existing features like outputting the assembly and AST?
The complexity problem comes from the number of different ways that a pointer can be represented:
1. pointer
2. ref
3. dynamic array
4. class
5. delegate
6. uplevel reference to local
especially when they are combined, like a ref to a pointer. Understanding how to use scope requires a thorough understanding of these (often implicit) pointers. This is why I recommend designing something with a prototype using raw pointers, get that to work, then add in the other reference types.
I don't see any way to have any sort of lifetime annotations without this understanding.
|
Copyright © 1999-2021 by the D Language Foundation