Hello, gaal is porting the Perl 5 filehandle functions to a Perl 6 OO interface. The Perl 5 interface with global constants from Fcntl strikes me as severely lacking in elegance and OO.
$fh.seek(-10, SEEK_END);
Instead of globals, how about a :from adverb?
$fh.seek(-10, :from<end>);
Or maybe we don't need such an adverb at all, and instead use
$fh.seek($fh.end - 10);
I'm a pretty high level guy, so I don't know about the performance
implications of that. Maybe we want to keep seek() low level, anyway.
Subject to change when it comes to the Perl 6 Unicode semantics, of
course. :)
Any thoughts/decisions?
--
wolverian
pgpjdFXn6ex1J.pgp
Description: PGP signature
