Re: basic quoting question

2012-10-08 Thread Ben Smith-Mannschott
On Mon, Oct 8, 2012 at 5:06 PM, Brian Craft wrote: > Thanks! > > Is the string vs symbol distinction peculiar to clojure, among lisps? > Yes, strings are distinct from symbols in every reputable lisp. That symbol and keyword know how to look themselves up in an associative collection is, as far

Re: basic quoting question

2012-10-08 Thread Brian Craft
Thanks! Is the string vs symbol distinction peculiar to clojure, among lisps? On Monday, October 8, 2012 8:03:00 AM UTC-7, Jack Moffitt wrote: > > > user=> ('X 'Y) > > nil > > > > All of these are as I expected except the last, which I thought would > throw > > something like the 1st case. W

Re: basic quoting question

2012-10-08 Thread Jack Moffitt
> user=> ('X 'Y) > nil > > All of these are as I expected except the last, which I thought would throw > something like the 1st case. What's going on there? You've prevented X from being evaluated (it will be seen as the symbol X), but you haven't prevented evaluation of the function call. Symbols

Re: basic quoting question

2012-10-08 Thread Jay Fields
symbol, 'X in the last case, implements IFn, and you're calling it with the symbol 'Y as an argument. On Mon, Oct 8, 2012 at 9:43 AM, Brian Craft wrote: > user=> ("X" "Y") > ClassCastException java.lang.String cannot be cast to clojure.lang.IFn > user/eval116 (NO_SOURCE_FILE:32) > user=> '(X Y) >

basic quoting question

2012-10-08 Thread Brian Craft
user=> ("X" "Y") ClassCastException java.lang.String cannot be cast to clojure.lang.IFn user/eval116 (NO_SOURCE_FILE:32) user=> '(X Y) (X Y) user=> ['X 'Y] [X Y] user=> '[X Y] [X Y] user=> ('X 'Y) nil All of these are as I expected except the last, which I thought would throw something like th