On Jan 14, 9:13 am, Jason Wolfe <jawo...@berkeley.edu> wrote: > > One thing worth pointing out is that, if a utility is really useful > many people will independently recreate it with slightly different > names and functionality, and use it in their code. It seems that this > results in code that's much more difficult to read than if the utility > was standardized in the first place.
That's a good point, but raises the question: is it enough to include your functions in clojure.contrib if the objective is to standardize them? Inclusion in the core is the most secure path to standardization :) I realise the core shouldn't be expanded forever, but in the case of map-when, map-while, etc: * these are _fundamental_ functions, as opposed to domain-specific functions (DB access, web programming, ...) which suggest "library" rather than "core" * they are _named_ like other fundamental functions, as you pointed out, so they add to the utility of the core without adding to its complexity * provided they're useful enough, they're crying out to be standardized in this way: it's odd to use take-when freely but have to load a library to use map-when I would say this argument does not hold for functions such as 'combinations. > > > [...] > > I'm not sure if this example supports or detracts from my argument > above. On one hand, these utilities are clearly useful enough that > I've independently recreated them (this also happened verbatim for > several utilities I later discovered in clojure.contrib). On the > other hand, given that they already existed (in clojure.core, no > less), this would seem to support your point that having more > standardized utilities just means that nobody will ever know them all > well. It's a very good point. I already feel daunted by the number of clojure's core functions, coming from an OO background where classes prevent global namespace pollution (and make it easier, for example, to read about all functions on strings, or lists, or ...). Therefore I would not be keen on a huge core. But I think it's important to plug the gaps (any?, map-when) with consistent naming schemes so that new users feel Clojure is well-organised, and a sensible, rich vocabulary develops amongs all users. I've spent a lot of time documenting Ruby's standard library, and based on that experience, think it's a damn good idea to get a lot of these "basics" sorted out as early as possible. On the other hand, I lack extensive experience in Clojure, so can't necessarily offer good judgement here. But please be assured I have read a _lot_ of messages in this group before posting any :) Gavin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---