On 2009 Feb 4, at 11:45, Aaron Crane wrote:
FWIW, I prefer the traditional spelling, "writable". Google suggests that "writeable" is more common on the web, though; 4.8 versus 3.7 Mghits.
I have to admit that "writable" suggests to me that you can serve a writ on it; an unlikely case for even Perl6 I/O. :)
+=head2 IO::POSIX + +Indicates that this object can perform standard posix IO operations.I don't like that wording, but getting it right seems tricky. The problem is that I don't think you mean for IO::POSIX to contain methods corresponding to POSIX-ish read(2), write(2), given that methods of those names exist in other roles. But those are precisely what I'd think of as most obviously falling into the category of "standard POSIX I/O operations".
Do we want/need to deal with POSIX conformance levels?
* It seems a little odd to put an flock method in an IO::POSIX role, given that POSIX specifies fcntl(F_SETLK) in place of traditional BSD-ish flock(). I'd be in favour of having .fcntl in IO::POSIX, but with an additional role providing .flock (IO::Flock, presumably).
I would think fcntl() is just the Unix version of a more general concept, which is probably wider than POSIX. As such, we may want to think about what is suitable for this. (I can see some ioctl() stuff fitting here, and possibly even some of setsockopt(), from the POSIXy end. I also have the impression that {,Open}VMS has some interest here.) Locking would then be a separate interface, even though on POSIX it uses the same system call as fileDescriptorConfigure or whatever the general call here is named.
Likewise POSIX pathconf() seems like a specific variant of a more general interface based on paths instead of file descriptors. Although I'm not sure what else would fit in here (ignoring something like pioctl() that only a small subset of Perl6 users would care about)... but that's quite possibly because I'm not very familiar with non-Unix/POSIX options.
Even given this, if we want compatibility we might provide stuff in IO::POSIX (IO::VMS, IO::Windows, whatever) which translates to these calls.
-- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH
PGP.sig
Description: This is a digitally signed message part