www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Recovering from DIP 1028

reply Bruce Carneal <bcarneal gmail.com> writes:
DIP 1028 is unsound (it assumes that extern(C) is safe).

DIP 1028 is deeply unpopular, just read the threads.

DIP 1028 opens dlang and the dlang community up for completely 
justified ridicule when it comes to safety.  (see Ethan's 
delightful thread:  safe/DIP1028 explained in meme).

Yes, all that and quite a bit more, but as I understand it DIP 
1028 has already been accepted, so what now?

Here are some of the possible paths forward:

1) Walter withdraws 1028 and resubmits after removing extern(C) 
==  safe.

2) Walter withdraws 1028 and resubmits nothing.

3) The community creates a shallow fork of DMD that isolates the 
cancer.  Perhaps a command line flag like:
   --safeAsDefault=no  // what we have now
   --safeAsDefault=yes // 1028 without extern(C) inanity
   --safeAsDefault=dwbh // 1028 as it stands, the "dont worry, be 
happy" option

4) "embrace the horror", do nothing

For myself, these are in order of preference.  If either 1) or 2) 
materializes in the near future, great.  Otherwise, if you are 
capable and desirous of leading 3), please contact me.  It's a 
lot less desirable than either 1) or 2) but if we can't have 
either of those, I want to help with the programming.

If you have better ideas on how to recover from DIP 1028, please 
speak up.
May 27
parent reply Clarice <cl ar.ice> writes:
Some have mentioned implementing additional  safe checks into 
D-scanner. I'd imagine that's a better and more realistic 
approach than creating a DMD fork since it would also allow one 
to use just LDC and GDC, and it would be easier to maintain. With 
all said, I hope it doesn't come to that; instead, options 1) or 
2) would happen.
There's also this: https://github.com/dlang/dmd/pull/11176
May 27
next sibling parent Bruce Carneal <bcarneal gmail.com> writes:
On Wednesday, 27 May 2020 at 22:51:33 UTC, Clarice wrote:
 Some have mentioned implementing additional  safe checks into 
 D-scanner. I'd imagine that's a better and more realistic 
 approach than creating a DMD fork since it would also allow one 
 to use just LDC and GDC, and it would be easier to maintain. 
 With all said, I hope it doesn't come to that; instead, options 
 1) or 2) would happen.
 There's also this: https://github.com/dlang/dmd/pull/11176
I had not seen the pull request. It certainly appears preferable to 3).
May 27
prev sibling parent Bruce Carneal <bcarneal gmail.com> writes:
On Wednesday, 27 May 2020 at 22:51:33 UTC, Clarice wrote:
 Some have mentioned implementing additional  safe checks into 
 D-scanner. I'd imagine that's a better and more realistic 
 approach than creating a DMD fork since it would also allow one 
 to use just LDC and GDC, and it would be easier to maintain. 
 With all said, I hope it doesn't come to that; instead, options 
 1) or 2) would happen.
 There's also this: https://github.com/dlang/dmd/pull/11176
The pull request could have a hard time getting past Walter's veto. The PR, if I understand it correctly, undermines some of what Walter argued was essential in 1028, universality and ease of use accomplished by defaulting unsafe libraries to safe silently. Here's hoping 1), 2) or the PR save the day.
May 27