On Mon, Oct 8, 2012 at 5:06 PM, Brian Craft <
craft...@gmail.com> 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 as i know, unique to Clojure.
// Ben
> 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. 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
>> happen to be functions that look themselves up in collections. 'Y is
>> not a collection, so it returns nil.
>>
>> Had you had something else in function position that wasn't actually a
>> valid function, you would have gotten a ClassCastException.
>>
>> jack.
>