We'll just have to agree to disagree on most of that
, as (if you ask MS) they'd suggest that
anything based on character buffers is
inherently unsafe on a purely philosophical level, which is just demonstrably untrue and based more on (as you suggest) the code people
do produce, rather the code they
could produce. Sure, it's awkward as heck to wrap one's brain around using the basic functions in a properly tight fashion (the poor programmer has to be hyper aware and vigilant of everything), which in this day and age is not the most popular of philosophies to be espousing. But that does not a function unsafe make.
For example, Great Britain made a great show of itself yesterday by declaring themselves the first country to recognise Parcour as a sport. (I'm old enough to think first of parkour flooring rather than some amusing urban runaround, but that's just me, and I digress.) We also shan't quibble on the definition of what a sport is either, as I'm the world's biggest Snooker fan but I'm also the first to deny it's any class of "sport" any more than Darts or Poker are. The primary result of GB's declaration however is that it can now be legally taught/practised in schools, as part of normal exercise curriculum.
Now it's pretty obvious to even the most casual observer that legally encouraging kids to imitate the dumbest stunts you can imagine on YouTube is a blatantly unsafe concept. In fact, it's probably the very definition of "unsafe" in the traditional sense of the term. That said, unless you're shackled by a mother's impractical sense of fear, there's technically nothing wrong with allowing people (kids, especially) to intentionally hurt themselves because (eventually) they do learn a proper respect for danger... and that can only be a good thing. That a few are lost to cracked skulls, broken bones, and death by misadventure is just natural selection at work, as crass as that may be.
So, it's a semantic thing: In the programming arena unsafe code is only unsafe for the other people (users) who will unintentionally suffer for the coder's mistakes. In that sense, I can excuse even managed code, and/or the designing of so-called safe functions as being laudable, though by no means necessary. What I take issue with is MS's nannying (and blind) insistence that
potentially-unsafe and unsafe-
actuelle mean the same thing. They do not.
snemarch wrote:move up an abstraction level
Curiously, having spent the majority of my life persuing abstract philosophical ends (ne perdez pas votre vie à la gagner does not mean what Google suggests it means), I lean these days more in the opposite direction... I rail against adding more abstraction, and see less (in the Buckminster Fulleresque sense) as being actually
more. But I'm weird that way; easier + safer != better.