Re: Is memory-safe IO possible?

2016-01-23 Thread Kagamin via Digitalmars-d-learn
You can try to write a trusted wrapper for one of curl functions and ask for a review on forum. Maybe it will be fruitful.

Re: Is memory-safe IO possible?

2016-01-22 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jan 22, 2016 at 11:15:58AM -0800, Brad Roberts via Digitalmars-d-learn wrote: > On 1/22/2016 9:10 AM, Chris Wright via Digitalmars-d-learn wrote: > >On Fri, 22 Jan 2016 08:36:14 +, Kagamin wrote: > > > >>Should be possible. Why not? > > > >Because almost no IO routines in Phobos are

Re: Is memory-safe IO possible?

2016-01-22 Thread Brad Roberts via Digitalmars-d-learn
On 1/22/2016 9:10 AM, Chris Wright via Digitalmars-d-learn wrote: On Fri, 22 Jan 2016 08:36:14 +, Kagamin wrote: Should be possible. Why not? Because almost no IO routines in Phobos are marked @safe, which implies that it's difficult in practice or that people simply haven't done it. I

Re: Is memory-safe IO possible?

2016-01-22 Thread Kagamin via Digitalmars-d-learn
Should be possible. Why not?

Re: Is memory-safe IO possible?

2016-01-22 Thread Chris Wright via Digitalmars-d-learn
On Fri, 22 Jan 2016 11:38:51 -0800, H. S. Teoh via Digitalmars-d-learn wrote: > @safe still isn't quite there yet, because it doesn't quite prevent all > of the things it ought to prevent. Well, that makes it suboptimal, certainly. But having almost no existing IO options that are @safe makes it

Re: Is memory-safe IO possible?

2016-01-22 Thread Chris Wright via Digitalmars-d-learn
On Fri, 22 Jan 2016 08:36:14 +, Kagamin wrote: > Should be possible. Why not? Because almost no IO routines in Phobos are marked @safe, which implies that it's difficult in practice or that people simply haven't done it. I checked std.file, std.net.curl, and std.stdio; a handful of things

Is memory-safe IO possible?

2016-01-21 Thread Chris Wright via Digitalmars-d-learn
I want everything I do to be memory-safe insofar as possible. One of the things I'm doing is communicating to REST services using std.net.curl. std.net.curl isn't marked @safe or @trusted. Is it possible to have properly memory-safe IO?