Phil, Overall I think this is a good idea, but I get the feeling duck- streams isn't quite ready, at least not today. However, this isn't to say that it couldn't be ready if we worked hard on it over the next few months.
Here are some things to look into off the top of my head 1. I'd recommend adding support for general unix file utilities. I've written some of them myself, and you can review/borrow/steal code from here: http://github.com/francoisdevlin/devlinsf-clojure-utils/blob/master/src/lib/sfd/file_utils.clj 2. duck-streams works very well for text, but not binary formats. I know there was discussion about it here: http://groups.google.com/group/clojure/browse_thread/thread/416ca90d3ce2fa3/d64648f34e5c8668 3. There should be a brainstorming session to see what objects reader/ writer will dispatch over, and the multimethods improved accordingly. This should probably happen anyway. Also, there's a bigger question of how Clojure will support IO. This becomes very platform specific, at least part of it do. Rich/the community will have to decide how to handle IO on multiple platforms, or to stick w/ the JVM for now. I know what I've described is a lot of work, but it's what is involved with creating a really well polished library. I think in the end this will be library we're all proud of. Thanks for bringing the idea up :) Sean On Jan 1, 6:27 am, Stefan Kamphausen <ska2...@googlemail.com> wrote: > Hi, > > On Jan 1, 3:58 am, Phil Hagelberg <p...@hagelb.org> wrote: > > > I've been looking over our use of contrib in our large-ish project > > at work. About 90% of the invocations of contrib functions are > > I/O-related. > > evil mutable little bastards, these files ;-) > > > I wonder if it would be a good idea to include a clojure.io > > namespace in Clojure itself. > > inc > > > I've prototyped this in the attached file. Most of the functions come > > from contrib's duck-streams library. I've taken everything from > > duck-streams except read-lines, file-str, make-parents, and pwd. > > > read-lines was left out since ... > > Sounds reasonable. > > > I welcome discussion about this proposal. Do you think it's > > necessary? Are there any functions we should leave out? > > Any others we should promote from contrib? > > I don't know whether it's in contrib already but I'd very much > appreciate a few macros lifting the burden of Java's io-lib with > Reader, BufferedReader, File, PushbackReader, WhateverReader > and ...Writers. Coming from the Lisp world this feels rather ugly to > my fingers. > > Kind regards, > Stefan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en