Closed arademaker closed 4 years ago
I had come to the same conclusion: the original name, sans star, is fine.
As for the implementations I have no preference.
On Mon, Feb 24, 2020, 7:37 AM Alexandre Rademaker notifications@github.com wrote:
Regarding the improvement proposed here https://gist.github.com/arademaker/50aa74e490bf2160547cb212c9a1bf05#gistcomment-3171255, after examining the macro expansion with one argument, I tend to prefer my original approach where the case of one spec is directly expanded to WITH-OPEN-FILE.
Regarding the name discussed in #48 https://github.com/ruricolist/serapeum/issues/48, I can't see any reason for something similar to let/let in this macro. Yes, in the current version it is sequential by nature, but different from let, each entry (stream filespec options) is always independent of each other. I don't see how the return of one entry (always a stream) can be used in the next entry (the symbol stream is what is bound, filespec and options can't be streams). The possibility of a "parallel" and "sequential" implementation for this macro doesn't make sense.
You can view, comment on, or merge this pull request online at:
https://github.com/ruricolist/serapeum/pull/51 Commit Summary
- with-open-files macro
File Changes
- M files.lisp https://github.com/ruricolist/serapeum/pull/51/files#diff-0 (14)
Patch Links:
- https://github.com/ruricolist/serapeum/pull/51.patch
- https://github.com/ruricolist/serapeum/pull/51.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ruricolist/serapeum/pull/51?email_source=notifications&email_token=AAC7AKH26JFJNJGHVQUXM7DREPEQJA5CNFSM4K2IMI22YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IPXM2YQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC7AKH5SBOAWKOVJIPVSQLREPEQJANCNFSM4K2IMI2Q .
Regarding the improvement proposed here, after examining the macro expansion with one argument, I tend to prefer my original approach where the case of one spec is directly expanded to WITH-OPEN-FILE.
Regarding the name discussed in #48, I can't see any reason for something similar to
let
/let*
in this macro. Yes, in the current version it is sequential by nature, but different fromlet
, each entry(stream filespec options*)
is always independent of each other. I don't see how the return of one entry (always a stream) can be used in the next entry (the symbolstream
is what is bound,filespec
andoptions
can't be streams). The possibility of a "parallel" and "sequential" implementation for this macro doesn't make sense.