Re: Type of let form

2013-10-04 Thread Brandon Bloom
I agree, it's clear that this is intentional. The promised public API is 
the "let" form; "let*" is an implementation detail. Clojure and 
ClojureScript already have subtly different internal special symbols. For 
example: try vs try*.

Unfortunately, this implementation detail leaks out in the macro & 
namespace systems because the special forms have unique symbol resolution 
rules. Luckily, clojure.core/special-symbol? can differentiate symbols with 
those resolution rules.

On Friday, October 4, 2013 4:20:58 PM UTC-4, John Hume wrote:
>
> This seems intentional, not a case of docs lagging behind. If you look at 
> the source of let you can see that it has :special-form true in its 
> metadata so that it will remain documented as special even though it's just 
> a macro.
>
> I assume the thinking is that it's more useful to continue to document 
> let, loop, and maybe others as special forms than to tell you they're 
> macros that expand into uglier calls to special forms, and then go on to 
> document (and support the APIs of) clojure.core/destructure and the less 
> sugary, true special forms (let*, loop*, and maybe others). 
>
> It's probably safe to assume these are implementation details that won't 
> necessarily hold in other dialects of Clojure and that breaking changes in 
> that layer might be introduced in a future version of Clojure and would not 
> be considered a backwards-incompatible change by the maintainers.
>
>
>
> On Fri, Oct 4, 2013 at 2:47 PM, Amrut >wrote:
>
>> Thanks. I went through the checkins and looks like it was changed 
>> here.
>>  This 
>> was 6 years back. Maybe it's time to update the documentation for special 
>> forms.
>>
>>
>> On Friday, October 4, 2013 11:41:22 AM UTC-7, Gary Trakhman wrote:
>>
>>> The definitive authority on what is a special form and what isn't is 
>>> Compiler.java:
>>>
>>> https://github.com/clojure/**clojure/blob/master/src/jvm/**
>>> clojure/lang/Compiler.java#L39
>>>
>>>
>>> On Fri, Oct 4, 2013 at 2:27 PM, Amrut  wrote:
>>>
 Hello,

 According to this , "let" is a 
 special form. but the 
 source tells 
 me that it's a macro that uses let*. I could not find any info on let* 
 form.
 Can someone please explain what is happening here?

 TIA

 -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups "Clojure" group.
 To post to this group, send email to clo...@googlegroups.com

 Note that posts from new members are moderated - please be patient with 
 your first post.
 To unsubscribe from this group, send email to
 clojure+u...@**googlegroups.com

 For more options, visit this group at
 http://groups.google.com/**group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google 
 Groups "Clojure" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to clojure+u...@**googlegroups.com.

 For more options, visit 
 https://groups.google.com/**groups/opt_out
 .

>>>
>>>  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> http://elhumidor.blogspot.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 - please be patient with your 
first post.
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Type of let form

2013-10-04 Thread John D. Hume
It seems like at least a gray area. Notably, clojure.core/destructure is
one of only 35 undocumented (via metadata) public vars out of almost 600 in
clojure.core. Here's the full list (1.5.1):

(->> 'clojure.core ns-publics vals (filter (comp nil? :doc meta)) (map
#(.sym %)) sort)
(*allow-unresolved-vars* *assert* *fn-loader* *math-context* *source-path*
*use-context-classloader* *verbose-defrecords* -cache-protocol-fn
-reset-methods EMPTY-NODE await1 chunk chunk-append chunk-buffer chunk-cons
chunk-first chunk-next chunk-rest chunked-seq? destructure
find-protocol-impl find-protocol-method hash-combine method-sig munge
primitives-classnames print-ctor print-dup print-method print-simple
proxy-call-with-super proxy-name unquote unquote-splicing
with-loading-context)



On Fri, Oct 4, 2013 at 3:48 PM, Gary Trakhman wrote:

> I agree user code probably shouldn't rely on the details of what's a
> special form and what isn't.  However, I see no problem with using
> destructure in user code, I've done so myself, and I don't think it's
> necessarily platform-specific.
>
> It's more obvious the intent when things are intentionally marked
> 'private'.  Seems like anything else is fair-game, with java bits being a
> clear delineation of host-specific functionality.
>
>
> On Fri, Oct 4, 2013 at 4:20 PM, John D. Hume wrote:
>
>> This seems intentional, not a case of docs lagging behind. If you look at
>> the source of let you can see that it has :special-form true in its
>> metadata so that it will remain documented as special even though it's just
>> a macro.
>>
>> I assume the thinking is that it's more useful to continue to document
>> let, loop, and maybe others as special forms than to tell you they're
>> macros that expand into uglier calls to special forms, and then go on to
>> document (and support the APIs of) clojure.core/destructure and the less
>> sugary, true special forms (let*, loop*, and maybe others).
>>
>> It's probably safe to assume these are implementation details that won't
>> necessarily hold in other dialects of Clojure and that breaking changes in
>> that layer might be introduced in a future version of Clojure and would not
>> be considered a backwards-incompatible change by the maintainers.
>>
>>
>>
>> On Fri, Oct 4, 2013 at 2:47 PM, Amrut  wrote:
>>
>>> Thanks. I went through the checkins and looks like it was changed 
>>> here.
>>>  This
>>> was 6 years back. Maybe it's time to update the documentation for special
>>> forms.
>>>
>>>
>>> On Friday, October 4, 2013 11:41:22 AM UTC-7, Gary Trakhman wrote:
>>>
 The definitive authority on what is a special form and what isn't is
 Compiler.java:

 https://github.com/clojure/**clojure/blob/master/src/jvm/**
 clojure/lang/Compiler.java#L39


 On Fri, Oct 4, 2013 at 2:27 PM, Amrut  wrote:

> Hello,
>
> According to this , "let" is a
> special form. but the 
> source tells
> me that it's a macro that uses let*. I could not find any info on let* 
> form.
> Can someone please explain what is happening here?
>
> TIA
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
>
> Note that posts from new members are moderated - please be patient
> with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@**googlegroups.com
>
> For more options, visit this group at
> http://groups.google.com/**group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to clojure+u...@**googlegroups.com.
>
> For more options, visit 
> https://groups.google.com/**groups/opt_out
> .
>

  --
>>> --
>>> 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 - please be patient with
>>> your first post.
>>> 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
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+unsubscr...@googlegroups.com.
>>> For more 

Re: Type of let form

2013-10-04 Thread Gary Trakhman
I agree user code probably shouldn't rely on the details of what's a
special form and what isn't.  However, I see no problem with using
destructure in user code, I've done so myself, and I don't think it's
necessarily platform-specific.

It's more obvious the intent when things are intentionally marked
'private'.  Seems like anything else is fair-game, with java bits being a
clear delineation of host-specific functionality.


On Fri, Oct 4, 2013 at 4:20 PM, John D. Hume wrote:

> This seems intentional, not a case of docs lagging behind. If you look at
> the source of let you can see that it has :special-form true in its
> metadata so that it will remain documented as special even though it's just
> a macro.
>
> I assume the thinking is that it's more useful to continue to document
> let, loop, and maybe others as special forms than to tell you they're
> macros that expand into uglier calls to special forms, and then go on to
> document (and support the APIs of) clojure.core/destructure and the less
> sugary, true special forms (let*, loop*, and maybe others).
>
> It's probably safe to assume these are implementation details that won't
> necessarily hold in other dialects of Clojure and that breaking changes in
> that layer might be introduced in a future version of Clojure and would not
> be considered a backwards-incompatible change by the maintainers.
>
>
>
> On Fri, Oct 4, 2013 at 2:47 PM, Amrut  wrote:
>
>> Thanks. I went through the checkins and looks like it was changed 
>> here.
>>  This
>> was 6 years back. Maybe it's time to update the documentation for special
>> forms.
>>
>>
>> On Friday, October 4, 2013 11:41:22 AM UTC-7, Gary Trakhman wrote:
>>
>>> The definitive authority on what is a special form and what isn't is
>>> Compiler.java:
>>>
>>> https://github.com/clojure/**clojure/blob/master/src/jvm/**
>>> clojure/lang/Compiler.java#L39
>>>
>>>
>>> On Fri, Oct 4, 2013 at 2:27 PM, Amrut  wrote:
>>>
 Hello,

 According to this , "let" is a
 special form. but the 
 source tells
 me that it's a macro that uses let*. I could not find any info on let* 
 form.
 Can someone please explain what is happening here?

 TIA

 --
 --
 You received this message because you are subscribed to the Google
 Groups "Clojure" group.
 To post to this group, send email to clo...@googlegroups.com

 Note that posts from new members are moderated - please be patient with
 your first post.
 To unsubscribe from this group, send email to
 clojure+u...@**googlegroups.com

 For more options, visit this group at
 http://groups.google.com/**group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google
 Groups "Clojure" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to clojure+u...@**googlegroups.com.

 For more options, visit 
 https://groups.google.com/**groups/opt_out
 .

>>>
>>>  --
>> --
>> 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 - please be patient with
>> your first post.
>> 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
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> http://elhumidor.blogspot.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 - please be patient with
> your first post.
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To pos

Re: Type of let form

2013-10-04 Thread John D. Hume
This seems intentional, not a case of docs lagging behind. If you look at
the source of let you can see that it has :special-form true in its
metadata so that it will remain documented as special even though it's just
a macro.

I assume the thinking is that it's more useful to continue to document let,
loop, and maybe others as special forms than to tell you they're macros
that expand into uglier calls to special forms, and then go on to document
(and support the APIs of) clojure.core/destructure and the less sugary,
true special forms (let*, loop*, and maybe others).

It's probably safe to assume these are implementation details that won't
necessarily hold in other dialects of Clojure and that breaking changes in
that layer might be introduced in a future version of Clojure and would not
be considered a backwards-incompatible change by the maintainers.



On Fri, Oct 4, 2013 at 2:47 PM, Amrut  wrote:

> Thanks. I went through the checkins and looks like it was changed 
> here.
>  This
> was 6 years back. Maybe it's time to update the documentation for special
> forms.
>
>
> On Friday, October 4, 2013 11:41:22 AM UTC-7, Gary Trakhman wrote:
>
>> The definitive authority on what is a special form and what isn't is
>> Compiler.java:
>>
>> https://github.com/clojure/**clojure/blob/master/src/jvm/**
>> clojure/lang/Compiler.java#L39
>>
>>
>> On Fri, Oct 4, 2013 at 2:27 PM, Amrut  wrote:
>>
>>> Hello,
>>>
>>> According to this , "let" is a
>>> special form. but the 
>>> source tells
>>> me that it's a macro that uses let*. I could not find any info on let* form.
>>> Can someone please explain what is happening here?
>>>
>>> TIA
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@googlegroups.com
>>>
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+u...@**googlegroups.com
>>>
>>> For more options, visit this group at
>>> http://groups.google.com/**group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+u...@**googlegroups.com.
>>>
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out
>>> .
>>>
>>
>>  --
> --
> 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 - please be patient with
> your first post.
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
http://elhumidor.blogspot.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 - please be patient with your 
first post.
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Type of let form

2013-10-04 Thread Amrut
Thanks. I went through the checkins and looks like it was changed 
here.
 This 
was 6 years back. Maybe it's time to update the documentation for special 
forms.

On Friday, October 4, 2013 11:41:22 AM UTC-7, Gary Trakhman wrote:
>
> The definitive authority on what is a special form and what isn't is 
> Compiler.java:
>
>
> https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L39
>
>
> On Fri, Oct 4, 2013 at 2:27 PM, Amrut >wrote:
>
>> Hello,
>>
>> According to this , "let" is a special 
>> form. but the source 
>> tells 
>> me that it's a macro that uses let*. I could not find any info on let* form.
>> Can someone please explain what is happening here?
>>
>> TIA
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
-- 
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 - please be patient with your 
first post.
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Type of let form

2013-10-04 Thread Gary Trakhman
The definitive authority on what is a special form and what isn't is
Compiler.java:

https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L39


On Fri, Oct 4, 2013 at 2:27 PM, Amrut  wrote:

> Hello,
>
> According to this , "let" is a special
> form. but the source 
> tells
> me that it's a macro that uses let*. I could not find any info on let* form.
> Can someone please explain what is happening here?
>
> TIA
>
> --
> --
> 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 - please be patient with
> your first post.
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 - please be patient with your 
first post.
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Type of let form

2013-10-04 Thread Amrut
Hello,

According to this , "let" is a special 
form. but the source  
tells 
me that it's a macro that uses let*. I could not find any info on let* form.
Can someone please explain what is happening here?

TIA

-- 
-- 
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 - please be patient with your 
first post.
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.