[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
From: |
Alaric Snell-Pym |
Subject: |
Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path. |
Date: |
Fri, 15 Mar 2013 09:54:44 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/15/2013 09:01 AM, Peter Bex wrote:
> On Fri, Mar 15, 2013 at 09:36:01AM +0100, Christian Kellermann wrote:
>> * Florian Zumbiehl <address@hidden> [130315 07:58]:
>>> Remove ##sys#expand-home-path as shell expansion has no place in a
>>> filesystem
>>> API.
>>
>> I'd rather prefer a "no-shell-expansion" feature than breaking the
>> current behaviour. This way programmers can choose when they need
>> a "dumb" implementation (because the name is made up by user input)
>> or whether the old behaviour should work for them.
>
> A saner way of doing it is to have an explicit shell expansion procedure
> through which you can pass the path string. That way, we achieve clean
> separation of functionality.
>
>> Ripping it out like this is not an option.
>
> I agree we can't immediately do it, but we should strive towards a clean,
> safe API in the long run. Just keeping it around is not an option either.
> Adding more parameters or options is ugly, IMHO.
I agree with Peter here.
Sure, it'll be handy to have a procedure that does shell-style expansion
on a path.
But it's broken to have it happen by default; in Ugarit I've obtained a
list of filenames from "(directory <path> #t)" and I proceed to
with-input-from-file each of the returned filenames. Seems sensible,
right? Except now I hear that it will break if people have filenames
starting with ~ or $...
This smacks of the kind of thing PHP does! It certainly shouldn't happen
by default, and ending up decorating all our new code with a standard
stanza of "no-<broken feature>" is not something we really want to have
to be teaching new users.
So, how can we migrate to explicit shell expansion? A depreciation
phase, so everyone gets a chance to make their code call the expander?
> Cheers,
> Peter
ABS
- --
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlFC7+QACgkQRgz/WHNxCGpcqACfUDVi4tfG/uqmzEU/iUEnevxw
kC8Anig541QPrmitGk2+76bqbKqfmPy0
=XLmm
-----END PGP SIGNATURE-----
- Re: [Chicken-hackers] [PATCH 4/4] files split-directory: don't split on backslashes on non-windows, (continued)
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Christian Kellermann, 2013/03/15
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Peter Bex, 2013/03/15
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.,
Alaric Snell-Pym <=
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Felix, 2013/03/15
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Peter Bex, 2013/03/15
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Jim Ursetto, 2013/03/15
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Felix, 2013/03/16
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Florian Zumbiehl, 2013/03/16
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Alaric Snell-Pym, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Mario Domenech Goulart, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Felix, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Mario Domenech Goulart, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Florian Zumbiehl, 2013/03/18