On Mar 15, 2013, at 3:35 PM, Peter Bex wrote: > On Fri, Mar 15, 2013 at 09:30:43PM +0100, Felix wrote: >> From: Peter Bex <[email protected]> >>> 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. >> >> But let's not forget convenience... > > I don't think (with-input-from-file (expand-path "~/foo") read) is less > convenient than (with-input-from-file "~/foo" read expand-path: #t)
I certainly agree with that. One option may be to create an egg that modifies and exports all the affected code. For example: (define (with-input-from-file str thunk . mode) (apply core:with-input-from-file (expand-path str) thunk mode)) And then you can import the module with or without a prefix if you want automatically-expanding versions. A second option would be to provide a global boolean parameter such as (expand-pathnames) which would enable or disable automatic path expansion. Jim _______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
