On Tue, Mar 24, 2009 at 10:19 PM, e <evier...@gmail.com> wrote: > I'm interested to know what the process/priority is on bubbling things up > from contrib into the core. Is a discussion under way about going through > it all? > > I also think it's good to have cross-language conventions sometimes unless > there are compelling reasons. > > For example, "slurp" is, perhaps, marginally better than "read" because it > may help express that it reads the whole file. Whereas, in Python, one only > knows that "read" reads the whole file when they compare it to the fact that > there is "readline()". BUT, basing it on python, yet IMPROVING, I'd > advocate for "read-all" and "read-line". Totally consistent AND > unambiguous. >
There's a reason Python's read is called read and not read-all, because it takes an argument for how many bytes to read. This argument just happens to be optional, in which case it will read everything. This is particularly useful when reading data from a binary file where you have to read the data in chunks (and you obviously can't rely on readline). Given that I don't see the need for also having a read-all function. -- Cosmin Stejerean http://offbytwo.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 -~----------~----~----~----~------~----~------~--~---