Re: Clojure terminology

2014-09-15 Thread Phillip Lord
jvanderhyde jamesvh...@hotmail.com writes: Thanks for the help, everyone. You managed to pin down my problem. I was using Clojure from the ground up and a Scheme book, and the two together got me confused. So, I can say it like this: Every expression is evaluated (meaning converted to a

Re: Clojure terminology

2014-09-15 Thread Phillip Lord
jvanderhyde jamesvh...@hotmail.com writes: Another random thought: What to you call this? [(+ 2 3) (+ 4 5)] It is an expression, but it is not a literal--I cannot say it evaluates to itself. So, only symbols and keywords really evaluate to themselves. All you are showing is that vectors

Re: Clojure terminology

2014-09-13 Thread Mark Engelberg
That's a neat trick! -- 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,

Re: Clojure terminology

2014-09-12 Thread Niels van Klaveren
http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome. Kyle Kingsbury's Clojure from the ground up has an excellent introduction about symbols, vars and quoting where he introduces them in the beginning of the course which makes things pretty clear and which makes the steo up to macro's

Re: Clojure terminology

2014-09-12 Thread Phillip Lord
jvanderhyde jamesvh...@hotmail.com writes: I want to say something like this: A word is considered a var unless it is quoted. Example: 'hello A list is considered a function invocation unless it is quoted. Example: '(1 2 3) I think you really need to bite the bullet and say everything

Re: Clojure terminology

2014-09-12 Thread Jeff Heon
+1 on this. I was really (pleasantly) surprised by this approach. On Friday, September 12, 2014 4:58:45 AM UTC-4, Niels van Klaveren wrote: http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome. Kyle Kingsbury's Clojure from the ground up has an excellent introduction about symbols,

Re: Clojure terminology

2014-09-12 Thread jvanderhyde
Thanks for the help, everyone. You managed to pin down my problem. I was using Clojure from the ground up and a Scheme book, and the two together got me confused. So, I can say it like this: Every expression is evaluated (meaning converted to a value), unless it is quoted. Every expression

Re: Clojure terminology

2014-09-12 Thread jvanderhyde
Another random thought: What to you call this? [(+ 2 3) (+ 4 5)] It is an expression, but it is not a literal--I cannot say it evaluates to itself. Sorry if I'm being pedantic. Maybe it doesn't matter. Terminology is important, though, when I'm trying to teach. -- You received this message

Re: Clojure terminology

2014-09-12 Thread Mark Engelberg
Relating to your random thought, note that: = '[(+ 2 3) (+ 4 5)] [(+ 2 3) (+ 4 5)] Probably the only way to make sense out of this is to talk about how every expression is first read then evaluated. You can interactively explore how things are read in Clojure with read-string. = (read-string (a

Re: Clojure terminology

2014-09-12 Thread Stephen C. Gilardi
On Sep 12, 2014, at 2:36 PM, Mark Engelberg mark.engelb...@gmail.com wrote: As far as I know, Clojure doesn't give you a whole lot of control over how things print at the REPL The built-in clojure repl has some customization options. You can run a repl with a custom reader and printer, for

Clojure terminology

2014-09-11 Thread jvanderhyde
I'm new to Clojure, but I'm teaching a course on it this year to undergrads. I'm having a little trouble with terminology, partly because Clojure departs from other languages (such as Scheme) on some terms (such as atom). I want to say something like this: A word is considered a var unless it

Re: Clojure terminology

2014-09-11 Thread blake
I'm having some trouble fleshing out the surrounding context, but I'll take a stab at this: I don't think word is the correct term to use. Do I mean symbol? Token, perhaps? Do I mean symbol instead of var? Yes. It may not be a var, after all. Is list better called a form or an s-expression?

Re: Clojure terminology

2014-09-11 Thread jvanderhyde
Thank you for the help. What is the difference between a form and an s-expression? The Clojure Glossary https://github.com/clojuredocs/guides/blob/master/articles/language/glossary.md defines form as a valid s-expression. What is an example of an invalid s-expression? I'm not sure token is

Re: Clojure terminology

2014-09-11 Thread Alex Miller
On Thursday, September 11, 2014 2:49:43 PM UTC-5, jvanderhyde wrote: I'm new to Clojure, but I'm teaching a course on it this year to undergrads. I'm having a little trouble with terminology, partly because Clojure departs from other languages (such as Scheme) on some terms (such as

Re: Clojure terminology

2014-09-11 Thread Mark Engelberg
This whole discussion makes me think you're trying to teach Clojure in a Scheme-like way, which maybe isn't the best approach. In Clojure, it is rare to need quoted lists and symbols. Instead of 'hello, you would use :hello. Instead of '(1 2 3), you would use [1 2 3]. So the whole notion of