safe

sclytrack sclytrack at constraint.com
Thu Jun 16 01:53:38 PDT 2011


Can't we have safety as in a restricted API or subset of a language
that can only do a limited amount of things that any user feels
confident executing, like only import from std.client and nothing
else is allowed. Memory safe D is already a restricted D.

----------------------------------------------

import std.client;


extern (C) routineIamNotSupposedToUse();   //eek


void handleButton1Click(   )
{
  downloadCompileAndExecute("http;//blabla.com/internetclientapplication.d");
  //Let's say D internet client application (DICA) consist of one .d file for
  //the sake of simplicity and speed.
}


void handleButton2Click(   )
{
  routineIamNotSupposedToUse(); //eek
  downloadCompileAndExecute("http://blabla.com/addressbook/page3.d");
}


----------------------------------------




== Quote from Jonathan M Davis (jmdavisProg at gmx.com)'s article
> On 2011-06-13 09:57, bearophile wrote:
> > sclytrack:
> > > How safe is "safe D" to run on your computer as if it is a client
> > > application.
> >
> > Walter (I think) has decided to call it "Safe D", but a better name is
> > "memory safe D" because it describes better that it gives only a
> > specialized kind of safety.
> _All_ safety is "only" a specialized kind of safety. It would be impossible to
> use the word safe in all of its contexts in a computer language. For instance,
> you could write a virus in D, and _that_ could certainly be considered unsafe.
> - Jonathan M Davis



More information about the Digitalmars-d mailing list