guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add "scandir" procedure


From: Ludovic Courtès
Subject: Re: [PATCH] Add "scandir" procedure
Date: Thu, 01 Sep 2011 14:12:51 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

Hi,

Nala Ginrut <address@hidden> skribis:

> Yes, that's what I want.

Great.  Please remind me to push it in 2.0 if I don’t do it in a timely
fashion.

> And I have a question between C and guile, should we add more useful
> functions in scheme or just wrap the POSIX C functions?

I guess it’s largely a matter of taste, but I’d prefer the former,
(unless it’s not doable from Scheme), because Scheme is more hackable
and because writing things in Scheme allows you to come up with more
idiomatic interfaces.

> I chose to wrap the POSIX C function because "scandir" is a common
> function.  Maybe some guys who're not familiar with Guile would find
> "scandir" first as he did under other languages.  But file-system-fold
> seems more flexible and portable. How about its speed?

I don’t have any figures.  However, when traversing a file system
hierarchy, the bottleneck is often I/O, so I wouldn’t worry about it.

Technically I think ‘file-system-fold’ does the minimum number of system
calls that it really needs to do.

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]