[Ecls-list] More changes

Juan Jose Garcia-Ripoll Juan.Ripoll at mpq.mpg.de
Fri Dec 21 22:44:42 UTC 2001


Hannu Koivisto wrote:
> 
> Juan Jose Garcia-Ripoll <Juan.Ripoll at mpq.mpg.de> writes:
> 
> > - Support for si::mkdir (by Rudy Schlatte)
> 
> What is the purpose of this function?  Why isn't standard
> ensure-directories-exist enough (ECL doesn't seem to have it, but
> that's besides the point)?

You can build ensure-... on top of a POSIX mkdir, not the other way
round.

> I would understand if this function resided in some POSIX package
> and provided full POSIX functionality (now mode is hardwired to
> 0777 and there is no way to get information about a possible error
> situation) but as it is now, I can't see any justification for it.

This was my fault. I did not notice that mkdir takes a mode argument.

> (FWIW, I also strongly oppose that this kind of functions are
> written in C and not in Lisp using FFI.)

That would be nice if the FFI from ECL was mature enough and fixed. This
is not the case. So the question is it worth to wait until someone
writes down a better FFI and only then get the POSIX functionality? Or
can we implement now a five-lines function that is useful to somebody
and that can be used to implement a missing function from the standard?

I like to see ECL grow out of small contributions that can be improved
in a near future. Worse is better for me. In a few weeks we will
probably have a new condition class which is a subtype of file-error and
which provides a field with the value of errno, or something like that.
That implies a one-line change in src/c/unixfsys.d and no change in the
code of si::mkdir. And then all functions dealing with the filesystem
will benefit from the change. So is it worth waiting?

Juanjo




More information about the ecl-devel mailing list