> The official docs for this are at: http://clojure.org/
> special_forms#let .
That's a great link. Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to cloju
On Aug 16, 2009, at 9:27 PM, Stephen C. Gilardi wrote:
>> What I might be able to do is define alternatively-hinted versions
>> of let, for, doseq, etc., and rebind clojure.core/destructure
>> during the evaluation of those macros so that the s:String style
>> can get layered on top of bind
On Aug 16, 2009, at 11:56 PM, tsuraan wrote:
(defh a
[b:String [c:Double :as list:java.util.List]
{d:java.util.Random :d}]
(.toCharArray b)
(.size list)
(.floatValue c)
(.nextInt d))
What's that :as in the [ c:Double :as list:java.util.List ] vector?
The entire expression you
> (defh a
>[b:String [c:Double :as list:java.util.List] {d:java.util.Random :d}]
>(.toCharArray b)
>(.size list)
>(.floatValue c)
>(.nextInt d))
What's that :as in the [ c:Double :as list:java.util.List ] vector?
--~--~-~--~~~---~--~~
You recei
On Aug 16, 2009, at 7:38 PM, Chas Emerick wrote:
On Aug 16, 2009, at 6:29 PM, Stephen C. Gilardi wrote:
Very cool! I like this a lot. Would you be up for writing some doc
strings and including it in clojure.contrib.def?
Yeah, I could do that.
I don't actually think it's practical on its
On Aug 16, 2009, at 6:29 PM, Stephen C. Gilardi wrote:
> On Aug 13, 2009, at 4:52 PM, Chas Emerick wrote:
>
>> I've actually been using it at the REPL here and there, and I've
>> found
>> it pretty pleasant -- it's a very pretty way to hint args compared to
>> #^, and arg:Type ordering makes for
On Aug 13, 2009, at 4:52 PM, Chas Emerick wrote:
I've actually been using it at the REPL here and there, and I've found
it pretty pleasant -- it's a very pretty way to hint args compared to
#^, and arg:Type ordering makes for easy readability (e.g. you can
very easily scan an arg form and see w
On Aug 12, 2009, at 3:24 PM, Chas Emerick wrote:
>> I'd hate to see somebody do it, but it's currently valid to define
>> variables with colons in them, so there could be code out in the wild
>> with those definition forms already. Other than that, I like the
>> looks of it. I think the macro
2009/8/12 Chas Emerick :
>
> On Aug 12, 2009, at 3:19 PM, Mark Volkmann wrote:
>
>> I didn't release it was valid to define names with colons in them.
>> Maybe that shouldn't be allowed. I'd like to be able to specify type
>> hints using UML-like syntax like the second example from Chas which
>> w
On Aug 12, 2009, at 3:19 PM, Mark Volkmann wrote:
> I didn't release it was valid to define names with colons in them.
> Maybe that shouldn't be allowed. I'd like to be able to specify type
> hints using UML-like syntax like the second example from Chas which
> was
>
> (defh foo [s:String unhinte
On Aug 12, 2009, at 2:02 PM, tsuraan wrote:
> I didn't put it in yet, but I was thinking of just having nil in the
> type vector for unhinted variables, so you could have
>
> (defn foo {:signature [ String String nil ]} [ a b c ] ...)
>
> and then c wouldn't be hinted. I hadn't thought of destru
I didn't release it was valid to define names with colons in them.
Maybe that shouldn't be allowed. I'd like to be able to specify type
hints using UML-like syntax like the second example from Chas which
was
(defh foo [s:String unhinted-arg {a:int :a}] ...)
On Wed, Aug 12, 2009 at 1:02 PM, tsura
> - There's already a lot of moving parts to type hinting, so adding
> this optional approach into defn seems like it'd lead to unintended
> consequences. That said, there's absolutely nothing wrong with an
> alternative def form (defh? as in 'define hinted fn') -- there's
> plenty of them throug
This is an interesting path to take. I'm not at all familiar with
haskell, but a couple of thoughts anyway :-) :
- There's already a lot of moving parts to type hinting, so adding
this optional approach into defn seems like it'd lead to unintended
consequences. That said, there's absolute
I'd like to add a :signature entry to the attr-map of defn, that
provides a haskell-style type signature to functions of the
single-arglist-body form. I find the the normal way of providing
hints to a function:
(defn [ #^Class1 var1 #^Class2 var2 #^Class3 var3] ... )
is way too noisy, and the v
15 matches
Mail list logo