Re: Battle-plan for CTFE

2016-08-13 Thread Stefan Koch via Digitalmars-d-announce
Hi, I took a break from work on string operations and focused instead of improving the robustness of the engine. I.E. for it not to halt the compiler on unsupported expressions. right now, I can compile druntime without failures. Phobos should be working by the end of next week. Have a nice

Re: DIP1000: Scoped Pointers

2016-08-13 Thread Walter Bright via Digitalmars-d-announce
On 8/13/2016 1:50 PM, Joseph Rushton Wakeling wrote: Sure, but doesn't the envisioned DIP create the circumstances in which it could also be permitted in @safe code where the compiler can guarantee that the pointer's lifetime will not outlive the data referred to? The whole point of ref is

Re: DIP1000: Scoped Pointers

2016-08-13 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Saturday, 13 August 2016 at 19:51:07 UTC, Walter Bright wrote: On 8/13/2016 5:02 AM, Joseph Rushton Wakeling wrote: On Saturday, 13 August 2016 at 11:09:05 UTC, Walter Bright wrote: Taking the address of a ref variable has not been allowed in @safe code for a long time. Which is

Re: DIP1000: Scoped Pointers

2016-08-13 Thread Walter Bright via Digitalmars-d-announce
On 8/13/2016 5:02 AM, Joseph Rushton Wakeling wrote: On Saturday, 13 August 2016 at 11:09:05 UTC, Walter Bright wrote: Taking the address of a ref variable has not been allowed in @safe code for a long time. Which is understandable given things as they are, but which could probably be relaxed

Re: DIP1000: Scoped Pointers

2016-08-13 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Saturday, 13 August 2016 at 11:09:05 UTC, Walter Bright wrote: Taking the address of a ref variable has not been allowed in @safe code for a long time. Which is understandable given things as they are, but which could probably be relaxed given good scope/lifetime analysis by the

Re: DIP1000: Scoped Pointers

2016-08-13 Thread Walter Bright via Digitalmars-d-announce
On 8/13/2016 1:13 AM, Joseph Rushton Wakeling wrote: On Friday, 12 August 2016 at 19:37:47 UTC, Walter Bright wrote: That's just what this DIP addresses. struct MyWrapperStruct (T) { private T* data; public this (ref T input) { this.data = //

Re: DIP1000: Scoped Pointers

2016-08-13 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Friday, 12 August 2016 at 19:37:47 UTC, Walter Bright wrote: That's just what this DIP addresses. struct MyWrapperStruct (T) { private T* data; public this (ref T input) { this.data = // error: not allowed to take address of ref variable