[m-rev.] splitting io.m

Paul Bone paul at bone.id.au
Wed Aug 19 10:09:10 AEST 2015


On Tue, Aug 18, 2015 at 02:34:32PM +1000, Zoltan Somogyi wrote:
> 
> 
> > - prolog-style see/seen/tell/told [1]
> > - progname
> > - command_line_arguments
> > - exit_status
> > - globals [1]
> > - environment variables
> > - make_temp
> > - remove file, rename file, symlinks, file access, file type, file modtime
> > - report_stats [2]
> > - call_system
> > 
> > I would have no qualms about deprecating [1] and moving [2].
> 
> I also would have no objection to moving some of those other groups,
> e.g. temp files, env vars, call_system, command line, to other
> modules. They aren't really about input or output, and the new modules
> containing them would have reasonably high cohesion. However, since
> these are small pieces of code, the vast majority of io.m would
> still be left behind.
> 

That's what I thought of doing by moving make_temp and other file
manipulation together to some other module.  I see Peter's point that dir.m
is about manipulating paths without doing IO.  However I'd still consider
that a likely place to put them.

Another group that makes sense to me is:

Environment and process:
    progname,
    command_line_arguments,
    exit_status,
    environment variables,
    and maybe call_system.

I'd also support putting call_system in a new submodule with
fork/exec/waitpid etc, if we provided those.

Cheers.


-- 
Paul Bone



More information about the reviews mailing list