> It is far from clear that having user specify the class as an input
> is always the right thing to do.
> 
> I don't like the idea of zillions of perl6 scripts getting hard-coded
> IO::File when we decide to change the class hierachy in perl6.2.

Great point. If you see at the bottom under IMPLEMENTATION, I put:


should probably make nicknames for these modules, such as "dir" for
IO:Dir, "socket" for IO::Socket, and so forth, so a person can type:

   $dir  = open "/usr/bin", dir;   # instead of IO::Dir


Actually, your argument makes it seem this should be the default case.
Indeed, get rid of the "IO::Dir" and "IO::Socket" altogether, and have
the person type:

   $fo = open "$filename";      # file is default
   $do = open "/usr/bin", dir;  # opens something dir-like
   $so = open "< 25", socket;   # opens something socket-like

And so on. I like it a lot. It's shorter and hides stuff from the user.

Thanks,
Nate

Reply via email to