Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-28 Thread Mark Rathwell
One clarification that might help is that traditionally the list has been the only structure in lisps, and other data representations were faked with lists. Clojure added other modern data structures to that traditional model (those are what are generally used for "data" purposes) and left the lis

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-27 Thread e
I think I understand more now though, everyone. Thanks. clojure chose lists for the data structure for code so lists sort of have a special place in the language. Thanks again. On Fri, Oct 28, 2011 at 1:13 AM, e wrote: > > > On Thu, Oct 27, 2011 at 8:26 PM, Mark Rathwell wrote: > >> > Maybe i

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-27 Thread e
On Thu, Oct 27, 2011 at 8:26 PM, Mark Rathwell wrote: > > Maybe it would be clearer if I proposed some other, lesser-used chars, > like > > "%(1 2 3 4)" or even "<1 2 3 4>". That is, I'm not so much saying, "this > > needs to be treated as data and not eval'd" as I am simply saying, "this > is >

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-27 Thread e
On Thu, Oct 27, 2011 at 7:42 PM, Stephen C. Gilardi wrote: > > On Oct 26, 2011, at 7:08 PM, e wrote: > > > [1 2 3] is a vector that is not evaluated. Since there is no overload > with things that are, there's no need for a special mark. > > If you type [1 2 3] into the REPL it is evaluated. The E

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-27 Thread Mark Rathwell
> Maybe it would be clearer if I proposed some other, lesser-used chars, like > "%(1 2 3 4)" or even "<1 2 3 4>".  That is, I'm not so much saying, "this > needs to be treated as data and not eval'd" as I am simply saying, "this is > the 'list' data structure as opposed to some other". A list data

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-27 Thread Stephen C. Gilardi
On Oct 26, 2011, at 7:08 PM, e wrote: > [1 2 3] is a vector that is not evaluated. Since there is no overload with > things that are, there's no need for a special mark. If you type [1 2 3] into the REPL it is evaluated. The E part of the REPL always runs. Some expressions evaluate to themsel

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-27 Thread e
You can also use the list function if you don't care about syntactic sugar, and it seems. Like it should look like this: => (list 1 2 3 4) '(1 2 3 4) or <1 2 3 4> <-- although i'd use that for vectors and use [] for lists. Wouldn't that be cool? I imagine (set 1 2 3 4) prints as #{1 2 3 4} On Oc

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-27 Thread e
On Oct 26, 2011 7:15 PM, "Stuart Halloway" wrote: >> >> checking out the "Try Clojure": >> >> if you type the following, you get output that matches what you typed >> in every case except for lists. >> >> Vectors: --> [1 2 3 4] >> [1 2 3 4] >> >> Maps: --> {:foo "bar" 3 4} >> {:foo "bar" 3 4} >> >

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-27 Thread Nicolas
Hi! Well [1 2 3] is just a syntaxic sugar for (vector 1 2 3): =>(vector 1 2 3) [1 2 3] When you enter a vector in the repl, it is evaluted to itself. Here an example that show it: =>[1 2 (+ 1 2)] [1 2 3] And you can use the vector function for the same result: =>(vector 1 2 (+ 1 2)) [1 2 3] The

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-26 Thread jaime
More reasonable.. On Oct 27, 7:15 am, Stuart Halloway wrote: > > checking out the "Try Clojure": > > > if you type the following, you get output that matches what you typed > > in every case except for lists. > > > Vectors: --> [1 2 3 4] > > [1 2 3 4] > > > Maps: --> {:foo "bar" 3 4} > > {:foo "b

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-26 Thread Mark Rathwell
> '(1 2 3) is a list that is not evaluated.  No loss of generality.  it's a > special type of list.  One that's not evaluated.  as opposed to a special > indicator to the repl. That would essentially be a new data structure, filling a role mostly already filled by vectors. And you would still nee

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-26 Thread Stuart Halloway
> checking out the "Try Clojure": > > if you type the following, you get output that matches what you typed > in every case except for lists. > > Vectors: --> [1 2 3 4] > [1 2 3 4] > > Maps: --> {:foo "bar" 3 4} > {:foo "bar" 3 4} > > Lists: --> '(1 2 3 4) > (1 2 3 4) <- *INCONSISTENT* why

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-26 Thread e
not necessarily. [1 2 3] is a vector that is not evaluated. Since there is no overload with things that are, there's no need for a special mark. '(1 2 3) is currently a way of say, "don't evaluate this list", but it could have been: '(1 2 3) is a list that is not evaluated. No loss of generali

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-26 Thread Mark Rathwell
The point to think about here is that functions are also lists, the same as your list of integers. The difference is that one is evaluated, the other is not. That is what the quote is saying: "don't evaluate me". The quote is not actually a part of the list. It's just the way you tell the reader

repl output for list seems inconsistent and a holdover from yesteryear

2011-10-26 Thread e
long long time since I last looked a clojure, but I've never lost interest and I'm trying to find the time again. for the short version see "*INCONSISTENT*", in the example at the end. I know what the answer will be here. Something like "you will get used to it". or "it's not important". or "no