Dlist and dip1000 challenge

Walter Bright newshound2 at digitalmars.com
Fri Oct 26 23:32:06 UTC 2018


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.


More information about the Digitalmars-d mailing list