Daniel Ruoso writes:
> Em Qua, 2009-02-04 às 16:45 +0000, Aaron Crane escreveu:
> > pugs-comm...@feather.perl6.nl writes:
> > > +=item method Int read($buf is rw, int $length)
> > I'm not sure that using a native int is the right thing here.  If
> > whatever the implementation uses as int is narrower than size_t, that
> > forces the programmer to use an Int and do the necessary loop.
> 
> native int can't be undefined, failures are undefined. The use of Int
> here is to support it returning unthrown exceptions.

Sorry, it was the native-int $length parameter I was talking about --
I think it should be a boxed Int instead.

> > POSIX-ish read(2), write(2)
> 
> That actually surprised me, for some reason I did think read and write
> were standard C, not POSIX

C stdio has fread(), fwrite() working on FILE*, with APIs similar
(but not identical) to POSIX read(), write().  C stdio doesn't known
anything about POSIX-ish file descriptors.

> That probably means IO::POSIX does IO::Readable does IO::Writeable.

Yes, indeed.  Sorry, I should have thought of that.

-- 
Aaron Crane ** http://aaroncrane.co.uk/

Reply via email to