Ok, I think I've got it - so basically all private variants should go
in contrib now and moving defn- now would break a lot of people's code
just for a little more coherency.
But in this case, I'd like def- to be included in clojure.contrib.def.
I dislike defvar as it's just name and docstring
Hello.
If def- remains for historical reason, def- may be marked as
duplicated and will be moved, for example, in 1.4, 2.0 or so?
Thank you.
--
Name: OGINO Masanori (荻野 雅紀)
E-mail: masanori.og...@gmail.com
--
You received this message because you are subscribed to the Google
Groups Clojure
On Jan 22, 5:13 pm, Stuart Halloway stuart.hallo...@gmail.com wrote:
Please don't. It has already been discussed and declined. The metadata
is uglier because we want doing this to be slightly ugly..
The Clojure/core team is led by its technical advisors, Rich Hickey and
myself. In this
Ugly? Aww, I thought the ^ metadata looked kinda cute...
It is a bit awkward that defn- exists and not def-, but it seems defs
are not going to be as common as defns (though I'll admit I haven't
written or read enough complex idiomatic Clojure code to know for
sure). And if you really want to
On Mon, Jan 24, 2011 at 8:42 PM, Nick Brown nwbr...@gmail.com wrote:
Ugly? Aww, I thought the ^ metadata looked kinda cute...
It is a bit awkward that defn- exists and not def-, but it seems defs
are not going to be as common as defns (though I'll admit I haven't
written or read enough
Hello.
And if you really want to be consistent you would probably
also want defmulti-, defmacro-, defstruct-, defprotocol-, etc.
In my opinion, if defn- is not in core but in contrib, I feel be consistent.
By the way, defstruct- and defmacro- is in contrib consistently :-)
If we really
stuart.hallo...@gmail.com wrote: Please don't. It has already been
discussed and declined. The metadata is uglier because we want doing
this to be slightly ugly..
Sorry, didn't get your response in time..
Anyways, I agree with Ken it seems weird to have defn- in core and not
def- - or is defn-
Hello.
Sorry to cut in, but I agree with Ken, too.
If defn- should be in core and def- shouldn't, it seems asymmetric.
Showing why there is asymmetric design may leads to positive
discussion, I think.
Thank you.
--
Name: OGINO Masanori (荻野 雅紀)
E-mail: masanori.og...@gmail.com
--
You
I think a def- definitely belongs in core for consistency reasons.
So I'm writing a ticket and patch now.
Cheers, Benjamin
--
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
Note that posts
Please don't. It has already been discussed and declined. The metadata is
uglier because we want doing this to be slightly ugly..
Stu
Stuart Halloway
Clojure/core
http://clojure.com
I think a def- definitely belongs in core for consistency reasons.
So I'm writing a ticket and patch now.
On Sat, Jan 22, 2011 at 10:27 AM, Stuart Halloway
stuart.hallo...@gmail.com wrote:
Please don't. It has already been discussed and declined. The metadata is
uglier because we want doing this to be slightly ugly..
We do? Who is we and why does this we want doing this to be slightly ugly?
--
1. You could optionally put a docstring after the value of a normal
def -- (def foo 17 seventeen).
def has supported an optional doc string since 1.2. I have just updated the
wiki and docstring to reflect this.
(defn foo
Docstring -- works currently
[x y]
(+ (* x x) y))
Please don't. It has already been discussed and declined. The metadata is
uglier because we want doing this to be slightly ugly..
We do? Who is we and why does this we want doing this to be slightly
ugly?
The Clojure/core team is led by its technical advisors, Rich Hickey and myself.
In
On Sat, Jan 22, 2011 at 10:39 AM, Stuart Halloway
stuart.hallo...@gmail.com wrote:
1. You could optionally put a docstring after the value of a normal
def -- (def foo 17 seventeen).
def has supported an optional doc string since 1.2. I have just updated the
wiki and docstring to reflect
On Sat, Jan 22, 2011 at 10:48 AM, Stuart Halloway
stuart.hallo...@gmail.com wrote:
Please don't. It has already been discussed and declined. The metadata is
uglier because we want doing this to be slightly ugly..
We do? Who is we and why does this we want doing this to be slightly
ugly?
Please don't. It has already been discussed and declined. The metadata is
uglier because we want doing this to be slightly ugly..
We do? Who is we and why does this we want doing this to be slightly
ugly?
The Clojure/core team is led by its technical advisors, Rich Hickey and
myself.
On Sat, Jan 22, 2011 at 11:13 AM, Stuart Halloway
stuart.hallo...@gmail.com wrote:
Please don't. It has already been discussed and declined. The metadata is
uglier because we want doing this to be slightly ugly..
We do? Who is we and why does this we want doing this to be slightly
ugly?
On 01/21/2011 12:51 AM, Ken Wesson wrote:
On Fri, Jan 21, 2011 at 12:40 AM, Alex Baranosky
alexander.barano...@gmail.com wrote:
I've wanted to have private defs. For defn, I just us defn-. But there is
no def-
So I just use:
(defmacro def- [name decls]
(list* `def (with-meta name
And in Clojure 1.3: (def ^:private foo ...)
-Stuart Sierra
Clojure/core
http://clojure.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
Note that posts from new members are moderated -
2011/1/21 Aaron Bedra aaron.be...@gmail.com
On 01/21/2011 12:51 AM, Ken Wesson wrote:
On Fri, Jan 21, 2011 at 12:40 AM, Alex Baranosky
alexander.barano...@gmail.com wrote:
I've wanted to have private defs. For defn, I just us defn-. But there
is
no def-
So I just use:
(defmacro
On 01/21/2011 09:22 AM, Laurent PETIT wrote:
2011/1/21 Aaron Bedra aaron.be...@gmail.com
mailto:aaron.be...@gmail.com
On 01/21/2011 12:51 AM, Ken Wesson wrote:
On Fri, Jan 21, 2011 at 12:40 AM, Alex Baranosky
alexander.barano...@gmail.com
On Fri, Jan 21, 2011 at 9:49 AM, Aaron Bedra aaron.be...@gmail.com wrote:
On 01/21/2011 09:22 AM, Laurent PETIT wrote:
2011/1/21 Aaron Bedra aaron.be...@gmail.com
On 01/21/2011 12:51 AM, Ken Wesson wrote:
On Fri, Jan 21, 2011 at 12:40 AM, Alex Baranosky
alexander.barano...@gmail.com
On Fri, Jan 21, 2011 at 12:38 PM, Ken Wesson kwess...@gmail.com wrote:
Another thing that could be useful: if the entire s-expression (def
...) or (defn ...) has metadata, merge it in, and if there's more than
one
meta, merge rather than replace.
That's how Clojure 1.3 already works...
user=
I've wanted to have private defs. For defn, I just us defn-. But there is
no def-
So I just use:
(defmacro def- [name decls]
(list* `def (with-meta name (assoc (meta name) :private true)) decls))
--
You received this message because you are subscribed to the Google
Groups Clojure group.
On Fri, Jan 21, 2011 at 12:40 AM, Alex Baranosky
alexander.barano...@gmail.com wrote:
I've wanted to have private defs. For defn, I just us defn-. But there is
no def-
So I just use:
(defmacro def- [name decls]
(list* `def (with-meta name (assoc (meta name) :private true)) decls))
The main usage (at least for me) is avoiding reflection in the context
of direct call to a Java method.
if you write:
(defn foo [x]
(.clone x))
Thank you for the insightful explanation.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post
The follow is the ring's source, and I am a newbie in Clojure.
what the defn of run-jetty looks like this form, what's the meaning of
#^Server in the defn and let?
Thanks in advance.
Limux.
(defn #^Server run-jetty
Serve the given handler according to the options.
Options:
:configurator
On Aug 9, 8:25 am, limux liumengji...@gmail.com wrote:
what's the meaning of
#^Server in the defn and let?
(defn #^Server run-jetty
...
(let [#^Server s (create-server (dissoc options :configurator))]
It's a type hint. In the defn it specifies the type of the return
value, in the let it
I see, heartly thanks, and there is no any words about it in API doc
of clojure.org yet!
Regards
limux.
On 8月9日, 下午3时04分, j-g-faustus johannes.fries...@gmail.com wrote:
On Aug 9, 8:25 am, limux liumengji...@gmail.com wrote:
what's the meaning of
#^Server in the defn and let?
(defn
The type hint can be placed on function parameters, let-bound names,
var names, and expressions.
And it can be placed behind or ahead of them. Isn't it?
On 8月9日, 下午3时31分, limux liumengji...@gmail.com wrote:
I see, heartly thanks, and there is no any words about it in API doc
of clojure.org
I am not 100% sure, but it seems they are always ahead.
(defn ^Bar foo ...)
tells that function foo returns something of class Bar.
(f ^Bar expr) says that expr is of type Bar.
(let [ ^Bar e expr] ... says that e is of type Bar.
(Bar can be a class or an interface.)
The main usage (at least
31 matches
Mail list logo