Gauche's glob implementation converts glob pattern component-wise into regexp.  I'd imagine other pure-Scheme
implementations would do the same.  It'd be trivial to accept a list of component patterns (each component
pattern being a string, regexp, or multi-component-wildcard)  in place of string glob-pattern.
(multi-component wildcard is "**", which matches zero or more arbitrary pathname components).

On Mon, Sep 30, 2019 at 11:10 AM John Cowan <> wrote:
AFAICT the SLIB implementation doesn't actually use the file system.  The Gauche version needs a way to enumerate directories, which of course SRFI 170 provides.  

It would be really nice if globbing in Scheme used SREs rather than glob patterns.  Scsh still uses glob patterns here, because it is just interfacing to glob().  It's trivial to convert a glob pattern to an SRE.

On Mon, Sep 30, 2019 at 3:46 PM Lassi Kortela <> wrote:
SLIB has a glob implementation written in pure Scheme.
<>. Copyright (C)
1998 Radey Shouman. The license is a custom-written; it looks like it
has the same conditions as a standard BSD license.

Gauche also ships with a BSD-licensed glob implementation in Scheme
written by Shiro:

Glob has been voted out of this SRFI (IMHO the right choice), but it
would be good to get tried and tested implementations into package
managers like Snow and Akku.