slurp is in Clojure, but spit is in Contrib?

38 views
Skip to first unread message

Stuart Halloway

unread,
Oct 6, 2008, 9:40:58 AM10/6/08
to clo...@googlegroups.com
Hi all

For consistency, I would like to see spit moved into the boot.clj.

This will play well with the Java crowd. For years I have poked fun of
Java for having megabytes of core library and no simple way to save a
file.

Stuart

Matti Jagula

unread,
Oct 6, 2008, 10:16:15 AM10/6/08
to clo...@googlegroups.com
Hi all,

On Mon, Oct 6, 2008 at 4:40 PM, Stuart Halloway
<stuart....@gmail.com> wrote:
> For consistency, I would like to see spit moved into the boot.clj.

I wholeheartedly agree.

And I'd also like both slurp and spit to support encoding as an
optional parameter as it is a bit of pain to write my own versions
just to read/write files with non-default encoding.

--
Matti Jagula

Stephen C. Gilardi

unread,
Oct 6, 2008, 10:43:14 AM10/6/08
to clo...@googlegroups.com

If this gets traction, please also consider a name change to something
more along the lines of "read-file" and "write-file".

--Steve

Parth Malwankar

unread,
Oct 6, 2008, 10:45:44 AM10/6/08
to Clojure
This would be a nice addition in my view.
It will be especially useful for people from non-java background
coming to Clojure. I know I was quite confused about how to
write to a file when I was ramping up on Clojure.

Parth


>
> Stuart

Paul Barry

unread,
Oct 6, 2008, 11:04:16 AM10/6/08
to Clojure
+1

Matti Jagula

unread,
Oct 6, 2008, 11:09:10 AM10/6/08
to clo...@googlegroups.com
On Mon, Oct 6, 2008 at 5:43 PM, Stephen C. Gilardi <sque...@mac.com> wrote:
> If this gets traction, please also consider a name change to something
> more along the lines of "read-file" and "write-file".

I guess that spit and slurp are more original and therefore less
likely to clash with existing function names. At least I'm quite sure
I've got quite a few "read-file"-s myself.

--
Matti Jagula

Reply all
Reply to author
Forward
0 new messages