James Reeves wrote:
> On Apr 6, 11:29 am, Jason Sankey <ja...@zutubi.com> wrote:
>> I think there may be a misunderstanding over "combining" here - I read
>> Stuart's mail to mean there was no obvious way to combine
>> duck-streams/file and java-utils/file, whereas this implementation shows
>> java-utils/file style behaviour only?
> 
> As far as I'm aware, it has most of both behaviours.

I guess the confusion is mine :).  I saw the primary difference as 
joining args with or without separators in between.

>> IMO even if the two functions could be combined, it would be confusing
>> to understand how the arguments passed in would be joined.  Better not
>> to try.
> 
> That's true. Conceptually, I prefer the java-utils/file method, which
> is basically the same as an identically named function I wrote for
> Compojure.

I also feel the java-utils version is more generally-applicable - it 
makes composing files easier without any assumptions about its input. 
The duck-streams version does other handy things like separator 
normalisation and tilde expansion, but that means it can't be used for 
all cases.  It feels like the latter is convenient for composing 
filenames from literals or at the repl, but not so good for handling 
arbitrary files/paths.

> The problem with having java-utils/file and duck-streams/file is that
> you lose the ability to load both namespaces at the same time without
> defining an exception for the file function. This does not seem like
> an ideal solution. I think we should choose one or the other, give
> them different names, or attempt to merge their functionality.

Generally speaking I'm happy to use (require [ ... :as ...]) to solve 
this problem (I expect as contrib grows name clashes will become 
inevitable).  In any case your point still stands from a conceptual 
point of view - having two functions named "file" in contrib with 
similar goals but different semantics is a recipe for confusion.

Cheers,
Jason

-- 
Pulse - Continuous Integration made easy.
Does your project have a pulse?
Try it free at: http://zutubi.com

--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to