Proposal: Promote clojure.contrib.def to a "core" lib

82 views
Skip to first unread message

Chas Emerick

unread,
Aug 14, 2009, 12:10:47 PM8/14/09
to Clojure
Seeing that some contrib libs have been promoted into the main clojure
project, I'd like to suggest that the same be done for
clojure.contrib.def (or, the majority of it). We use it nearly
everywhere, and I suspect many others do as well.

As a slight caveat, I'm not sure that the defalias, defhinted, or name-
with-attributes members in def are central enough and/or used enough
to warrant promotion. It seems reasonable that they'd be "left
behind" in c.c.def, with the other forms promoted -- either into
core.clj or into a clojure.def namespace.

Thoughts?

- Chas

Daniel Lyons

unread,
Aug 14, 2009, 12:52:07 PM8/14/09
to clo...@googlegroups.com


I myself am rather fond of defvar. I'm for it.


Daniel Lyons

Sean Devlin

unread,
Aug 14, 2009, 1:21:13 PM8/14/09
to Clojure
As long as the documentation doesn't disappear between the time the
library is removed from contrib and the appropriate version (1.1, 1.2)
of Clojure is released.

Not-so-subtle hint:
http://groups.google.com/group/clojure/browse_thread/thread/8f191d3a9620977

Sean

Jarkko Oranen

unread,
Aug 14, 2009, 1:53:08 PM8/14/09
to Clojure
I'm in favour.

Though, I think that a "def-" would be redundant if the defvar macros
are promoted. Perhaps it would be sensible to keep def as a the
underlying special form and just move in defvar, defvar- and
defmacro-.

I'm not sure whether defonce is useful enough that it should be moved
to core, so I'll abstain.

The larger macros (eg. defnk) should definitely remain in contrib.

--
Jarkko

Tom Faulhaber

unread,
Aug 14, 2009, 9:34:18 PM8/14/09
to Clojure
Docs for cutting edge Clojure are on the way. Rich said he was going
to think about the approach he wanted to take and we'll get it up and
running when he gets back from vacation.

Hang tight,

Tom

On Aug 14, 10:21 am, Sean Devlin <francoisdev...@gmail.com> wrote:
> As long as the documentation doesn't disappear between the time the
> library is removed from contrib and the appropriate version (1.1, 1.2)
> of Clojure is released.
>
> Not-so-subtle hint:http://groups.google.com/group/clojure/browse_thread/thread/8f191d3a9...

Phlex

unread,
Aug 20, 2009, 12:59:32 PM8/20/09
to clo...@googlegroups.com

On 14/08/2009 19:53, Jarkko Oranen wrote:
>
> I'm not sure whether defonce is useful enough that it should be moved
> to core, so I'll abstain.
>
>

I use defonce and defonce- quite a lot.
I'm all for inclusion of c.c.def in core.

Sacha

Timothy Pratley

unread,
Aug 20, 2009, 7:18:23 PM8/20/09
to Clojure
If defvar was
[doc-string? name init?]
It would obviate defunbound
(defvar "A set of current TCP connections"
connections #{})
And the backward compatible form could still be supported if necessary
[name init? doc-string?]


Regards,
Tim.
Reply all
Reply to author
Forward
0 new messages