Thread overview | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
May 28, 2020 DIP 1028 "Make @safe the Default" is dead | ||||
---|---|---|---|---|
| ||||
The subject says it all. If you care about memory safety, I recommending adding `safe:` as the first line in all your project modules, and annotate individual functions otherwise as necessary. For modules with C declarations, do as you think best. For everyone else, carry on as before. |
May 29, 2020 Re: DIP 1028 "Make @safe the Default" is dead | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Friday, 29 May 2020 at 04:53:07 UTC, Walter Bright wrote:
> The subject says it all.
>
> If you care about memory safety, I recommending adding `safe:` as the first line in all your project modules, and annotate individual functions otherwise as necessary. For modules with C declarations, do as you think best.
>
> For everyone else, carry on as before.
Thanks Walter.
I hope that Steve's recent auto-inference ideas might yet help us achieve your, widely shared, goal of expanding @safe coverage/utility.
|
May 29, 2020 Re: DIP 1028 "Make @safe the Default" is dead | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Friday, 29 May 2020 at 04:53:07 UTC, Walter Bright wrote:
> The subject says it all.
>
> If you care about memory safety, I recommending adding `safe:` as the first line in all your project modules, and annotate individual functions otherwise as necessary. For modules with C declarations, do as you think best.
>
> For everyone else, carry on as before.
Thank you for listening to the community's feedback.
|
May 29, 2020 Re: DIP 1028 "Make @safe the Default" is dead | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Am 29.05.20 um 06:53 schrieb Walter Bright:
> The subject says it all.
>
> If you care about memory safety, I recommending adding `safe:` as the first line in all your project modules, and annotate individual functions otherwise as necessary. For modules with C declarations, do as you think best.
>
> For everyone else, carry on as before.
Thank you, Walter. I understand that this comes with a lot of frustration (and maybe bitterness and resignation). But I really appreciate your decision to respect the community's opinion. It is the right thing to do. You have my biggest respect.
|
May 29, 2020 Re: DIP 1028 "Make @safe the Default" is dead | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Friday, 29 May 2020 at 04:53:07 UTC, Walter Bright wrote:
> The subject says it all.
>
> If you care about memory safety, I recommending adding `safe:` as the first line in all your project modules, and annotate individual functions otherwise as necessary. For modules with C declarations, do as you think best.
>
> For everyone else, carry on as before.
Great. Thanks for accepting the community's feedback.
On the extern(C) issue, I wasn't convinced by your concerns about programmers taking the path of least syntactical resistance, BUT if that would really have been a serious problem, I think just keeping @system as default really is the best solution:
Ideally @safe would be brainlessly easy to use, however currently it can't truly do its job without some level of understanding and effort on the part of the user. So, better to just leave the whole system off by default, than try to force it on people who can't or won't make the effort to use it correctly.
(I say this even though I try to use @safe as much as possible in my own code.)
|
May 29, 2020 Re: DIP 1028 "Make @safe the Default" is dead | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bruce Carneal | On Friday, 29 May 2020 at 05:08:44 UTC, Bruce Carneal wrote:
> On Friday, 29 May 2020 at 04:53:07 UTC, Walter Bright wrote:
>> The subject says it all.
>>
>> If you care about memory safety, I recommending adding `safe:` as the first line in all your project modules, and annotate individual functions otherwise as necessary. For modules with C declarations, do as you think best.
>>
>> For everyone else, carry on as before.
>
> Thanks Walter.
>
> I hope that Steve's recent auto-inference ideas might yet help us achieve your, widely shared, goal of expanding @safe coverage/utility.
Steve calls it "inferred-by-default", not "auto-inference". It looks like a great way to bring a ton-load of code in to the @safe tent with low effort, but that's just the beginning.
|
May 29, 2020 Re: DIP 1028 "Make @safe the Default" is dead | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 29.05.20 06:53, Walter Bright wrote: > The subject says it all. Thanks! For the record, this would have been my preference: fix @safe, @safe by default > fix @safe, @system by default > don't fix @safe, @system by default > don't fix @safe, @safe by default While this retraction improves matters in the short term, I think there is still potential for improvement. In particular, `@safe` is still broken for function prototypes. > I recommending adding `safe:` as the first line in all your project modules It would be great if `@safe:` did not affect declarations that would otherwise infer annotations. |
May 29, 2020 Re: DIP 1028 "Make @safe the Default" is dead | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Thank you Walter. |
May 29, 2020 Re: DIP 1028 "Make @safe the Default" is dead | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Friday, 29 May 2020 at 04:53:07 UTC, Walter Bright wrote:
> The subject says it all.
>
> If you care about memory safety, I recommending adding `safe:` as the first line in all your project modules, and annotate individual functions otherwise as necessary. For modules with C declarations, do as you think best.
>
> For everyone else, carry on as before.
Can we get a compiler flag that will enable safe by default for people who might want it?
|
May 29, 2020 Re: DIP 1028 "Make @safe the Default" is dead | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 5/28/20 9:53 PM, Walter Bright wrote:
> The subject says it all.
>
> If you care about memory safety, I recommending adding `safe:` as the first line in all your project modules, and annotate individual functions otherwise as necessary. For modules with C declarations, do as you think best.
>
> For everyone else, carry on as before.
Thank you! Which meme did it? :o)
Ali
|
Copyright © 1999-2021 by the D Language Foundation