Re: Question on mandatory arguments for - and - macros

2012-10-12 Thread Laurent PETIT
2012/10/12 Jason Wolfe ja...@w01fe.com

 On Thursday, October 11, 2012 10:29:57 AM UTC-7, Shantanu Kumar wrote:



 On Tuesday, 9 October 2012 06:07:06 UTC+5:30, Jason Wolfe wrote:



 On Sunday, October 7, 2012 9:27:15 PM UTC-7, Shantanu Kumar wrote:



 On Monday, 8 October 2012 04:57:06 UTC+5:30, Stuart Sierra wrote:

 From the look of the source, there's no reason why - couldn't have
 arity-1. I guess it just doesn't come up much.


 Arity-1 for - would be useful to let somebody comment out forms as
 follows:

 (- foo
   #_(bar baz)
   #_quux)

 I can file an issue on JIRA if this makes sense.



 +1 I've hit this issue before when generating a macroexpansion with -
 in it.

 Also, I think at some point - and - weren't themselves properly
 namespaced in their own macroexpansions, not sure if it's still an issue
 but maybe worth checking while you're in there.


 Jason, do you have a snippet to reproduce the error you described?


 Now that I think about it, I believe the namespace issue was in -? and
 -? from an old contrib library.  Sorry for the noise.



Yeah, and I'm not sure it has been corrected yet, btw ?






 Shantanu

  --
 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 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

Re: Question on mandatory arguments for - and - macros

2012-10-12 Thread Shantanu Kumar


On Monday, 8 October 2012 09:57:15 UTC+5:30, Shantanu Kumar wrote:



 On Monday, 8 October 2012 04:57:06 UTC+5:30, Stuart Sierra wrote:

 From the look of the source, there's no reason why - couldn't have 
 arity-1. I guess it just doesn't come up much.


 Arity-1 for - would be useful to let somebody comment out forms as 
 follows:

 (- foo
   #_(bar baz)
   #_quux)

 I can file an issue on JIRA if this makes sense.


I have filed it as `enhancement` here: 
http://dev.clojure.org/jira/browse/CLJ-1086

Shantanu

-- 
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

Re: Question on mandatory arguments for - and - macros

2012-10-12 Thread Stuart Sierra
Thank you, especially thanks for tagging it an enhancement.
-S

-- 
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

Re: Question on mandatory arguments for - and - macros

2012-10-11 Thread Shantanu Kumar


On Tuesday, 9 October 2012 06:07:06 UTC+5:30, Jason Wolfe wrote:



 On Sunday, October 7, 2012 9:27:15 PM UTC-7, Shantanu Kumar wrote:



 On Monday, 8 October 2012 04:57:06 UTC+5:30, Stuart Sierra wrote:

 From the look of the source, there's no reason why - couldn't have 
 arity-1. I guess it just doesn't come up much.


 Arity-1 for - would be useful to let somebody comment out forms as 
 follows:

 (- foo
   #_(bar baz)
   #_quux)

 I can file an issue on JIRA if this makes sense.



 +1 I've hit this issue before when generating a macroexpansion with - in 
 it.  

 Also, I think at some point - and - weren't themselves properly 
 namespaced in their own macroexpansions, not sure if it's still an issue 
 but maybe worth checking while you're in there. 


Jason, do you have a snippet to reproduce the error you described?

Shantanu

-- 
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

Re: Question on mandatory arguments for - and - macros

2012-10-11 Thread Jason Wolfe
On Thursday, October 11, 2012 10:29:57 AM UTC-7, Shantanu Kumar wrote:



 On Tuesday, 9 October 2012 06:07:06 UTC+5:30, Jason Wolfe wrote:



 On Sunday, October 7, 2012 9:27:15 PM UTC-7, Shantanu Kumar wrote:



 On Monday, 8 October 2012 04:57:06 UTC+5:30, Stuart Sierra wrote:

 From the look of the source, there's no reason why - couldn't have 
 arity-1. I guess it just doesn't come up much.


 Arity-1 for - would be useful to let somebody comment out forms as 
 follows:

 (- foo
   #_(bar baz)
   #_quux)

 I can file an issue on JIRA if this makes sense.



 +1 I've hit this issue before when generating a macroexpansion with - 
 in it.  

 Also, I think at some point - and - weren't themselves properly 
 namespaced in their own macroexpansions, not sure if it's still an issue 
 but maybe worth checking while you're in there. 


 Jason, do you have a snippet to reproduce the error you described?


Now that I think about it, I believe the namespace issue was in -? and 
-? from an old contrib library.  Sorry for the noise.

 


 Shantanu


-- 
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

Re: Question on mandatory arguments for - and - macros

2012-10-08 Thread Jason Wolfe


On Sunday, October 7, 2012 9:27:15 PM UTC-7, Shantanu Kumar wrote:



 On Monday, 8 October 2012 04:57:06 UTC+5:30, Stuart Sierra wrote:

 From the look of the source, there's no reason why - couldn't have 
 arity-1. I guess it just doesn't come up much.


 Arity-1 for - would be useful to let somebody comment out forms as 
 follows:

 (- foo
   #_(bar baz)
   #_quux)

 I can file an issue on JIRA if this makes sense.



+1 I've hit this issue before when generating a macroexpansion with - in 
it.  

Also, I think at some point - and - weren't themselves properly 
namespaced in their own macroexpansions, not sure if it's still an issue 
but maybe worth checking while you're in there. 



 Shantanu


-- 
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

Re: Question on mandatory arguments for - and - macros

2012-10-07 Thread Shantanu Kumar


On Monday, 8 October 2012 04:57:06 UTC+5:30, Stuart Sierra wrote:

 From the look of the source, there's no reason why - couldn't have 
 arity-1. I guess it just doesn't come up much.


Arity-1 for - would be useful to let somebody comment out forms as 
follows:

(- foo
  #_(bar baz)
  #_quux)

I can file an issue on JIRA if this makes sense.

Shantanu

-- 
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

Question on mandatory arguments for - and - macros

2012-10-06 Thread Shantanu Kumar
Hi,

I am curious about the rationale for the mandatory arguments for -
and - macros.

user= (doc -)
-
clojure.core/-
([x] [x form] [x form  more])

user= (doc -)
-
clojure.core/-
([x form] [x form  more])

For - a form is optional, but for - it is not. Can anybody help me
understand why is there a difference?

Shantanu

-- 
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