Why so?

1 view
Skip to first unread message

vishy

unread,
Sep 3, 2010, 2:50:27 AM9/3/10
to Clojure
It is better to have 100 functions operate on one data structure than
10 functions on
10 data structures.
-- Alan Perlis

Why so? How is it advantageous?

Mark Hamstra

unread,
Sep 3, 2010, 8:05:57 AM9/3/10
to Clojure
The context of the comment is functional programming vs. OO
programming. Pure functions compose better than do state-containing
objects, and 100! is much larger than 10!, so you have many more
options for composition/reuse with 100 functions that operate on a
single data abstraction.

fin

unread,
Sep 3, 2010, 11:50:53 AM9/3/10
to Clojure
It is better to have 100 functions in one category than 10 functions
in 10 categories?

I don't think so. See:
http://clojure.github.com/clojure/clojure.core-api.html

David Nolen

unread,
Sep 3, 2010, 11:54:58 AM9/3/10
to clo...@googlegroups.com
Clojure functions categorized: http://clojuredocs.org/quickref/Clojure%20Core

Alan

unread,
Sep 3, 2010, 12:01:51 PM9/3/10
to Clojure
A very handy web page to have around; thanks for mentioning it. It
looks nice too, but the accessibility is a bit poor - when I look at
it with an increased text size, the CSS quickly falls apart and
renders it confusing and/or unreadable. So if the maintainer for that
site is on this newsgroup somewhere, maybe you could look at it?

Steven E. Harris

unread,
Sep 3, 2010, 6:32:01 PM9/3/10
to clo...@googlegroups.com
David Nolen <dnolen...@gmail.com> writes:

> Clojure functions categorized: http://clojuredocs.org/quickref/Clojure%20Core

Wow, that is very nice -- especially the expandable view of the
implementation source.

--
Steven E. Harris

Paul deGrandis

unread,
Sep 3, 2010, 1:22:18 PM9/3/10
to Clojure
Thanks for sharing this link David. Love it.

On Sep 3, 8:54 am, David Nolen <dnolen.li...@gmail.com> wrote:

vishy

unread,
Sep 4, 2010, 10:34:25 AM9/4/10
to Clojure
thanks for the link!!!

Lee Hinman

unread,
Sep 5, 2010, 10:51:14 AM9/5/10
to clo...@googlegroups.com
On Fri, Sep 3, 2010 at 10:01 AM, Alan <al...@malloys.org> wrote:
> A very handy web page to have around; thanks for mentioning it. It
> looks nice too, but the accessibility is a bit poor - when I look at
> it with an increased text size, the CSS quickly falls apart and
> renders it confusing and/or unreadable. So if the maintainer for that
> site is on this newsgroup somewhere, maybe you could look at it?

I'll mention it to Zach, thanks for the heads up.

- Lee

Bob Shock

unread,
Sep 5, 2010, 12:55:05 PM9/5/10
to Clojure
I've been programming in large OO applications since about 1993.

One problem is that a lot of useful code gets buried way deep in an OO
class hierarchy, where you are forced to create lots of intermediate
objects just to get to the useful functions.

This really hurts the re-usability, unit testabilty, and a lot of
other ilities.
Reply all
Reply to author
Forward
0 new messages