OSNews article about C++09 degenerates into C++ vs. D discussion
Brad Roberts
braddr at puremagic.com
Mon Nov 27 12:40:07 PST 2006
On Mon, 27 Nov 2006, Benji Smith wrote:
> Date: Mon, 27 Nov 2006 12:59:45 -0700
> From: Benji Smith <dlanguage at benjismith.net>
> Reply-To: digitalmars.D <digitalmars-d at puremagic.com>
> To: digitalmars-d at puremagic.com
> Newsgroups: digitalmars.D
> Subject: Re: OSNews article about C++09 degenerates into C++ vs. D discussion
>
> Don Clugston wrote:
> > I think it's even worse than that. The opposite of 'unsafe' is *not* safe!
> >
> > My brother has worked with medical software which contain software bugs
> > which kill people. And the bugs are NOT 'dangling pointers', they are
> > incorrect mathematics (wrong dosage, etc). The code is 'safe', yet people
> > have been taken out in body bags.
> >
> > I think this whole "safe"/"unsafe" concept can be distracting -- the goal is
> > software with no bugs! It's just a tool to reduce a specific class of bugs.
> > D does many features which help to reduce bugs, the concept of 'safe' code
> > just isn't one of them.
>
> I actually like the "unsafe" keyword in C# (never used C++.NET).
>
> The words "safe" and "unsafe" refer only to type-safety, so it would be more
> accurate (but cumbersome) if the keyword was "untypesafe" to indicate blocks
> of code circumventing the type system.
>
> It's nice to know that the default assumption in C# is that nearly all code
> will subject itself to the compiler's static type checking. Sure, sometimes
> it's necessary circumvent the type system by casting pointers, but I think it
> helps enforce good programming practice that those untypesafe operations have
> to be specifically annotated before the compiler will accept them.
>
> --benji
(Sorry Benji.. using your post to reply to this thread. I'm not
specifically replying to your post, just gotta have that hook.)
I really hate the term 'safe'. It's ambiguous. What's safe? How safe?
It's just as useless a term as 'managed'. Both terms are specifically
designed to enduce that warm fuzzy feeling and sidestepping the issue of
what they actually really mean.
I recognize that a major portion of my own personal bias against VM based
runtime environments is due to the frequent association with this sort of
need for warm fuzzies with a careful avoidance to specifying the exact
real gained benefits. I fully recognize that there _are_ benefits, just
that the conflation with non-specific benefits diminishes the whole
picture in my world-view.
Grumble,
Brad
More information about the Digitalmars-d
mailing list