How I use D
Cym13
cpicard at purrfect.fr
Mon Jun 29 12:56:47 UTC 2020
On Monday, 29 June 2020 at 12:18:02 UTC, Guillaume Piolat wrote:
>
> I'll bite:
>
> I've been defending:
> - unsafe by default,
> - throw by default,
> - impure by default,
> - mutable by default
>
> for years. To me those defaults are the right ones, and it
> warms me up that, as it seems, your D usage would be made
> _almost impossible_ if the permissive default changed to a
> strict one.
>
> I've been in a similar situation where you have to create an
> internal tool as fast as possible because of limited political
> support, and all those features - that are completely rational
> and acceptable in the right context - may reveal a liability in
> the trenches.
>
> So I hope people will keep the important use cases of _bad
> programs_, may I say in mind when improving D.
This is absolutely true. These are the reason why D is useful to
me.
That said, I have mixed feelings since it's also true that,
should these features be introduced by default, they would help
with many bugs I see that cause security issues. As much as I
like my job I would be happier if it weren't needed.
It wouldn't fix everything since the most common issues are at a
much higher level (such as forgetting to protect a web page with
authentication). It would help with memory corruptions and
possibly race conditions since it would incentivise safer use of
multithreading.
I'd be stuck though. Please don't. I don't want to write Go :p
More information about the Digitalmars-d
mailing list