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 atom). > > 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 don't think "word" is the correct term to use. Do I mean "symbol"? Do I > mean "symbol" instead of "var"? >
I think "word" is fine here. You're basically leveraging knowledge of English to informally describe something. Seems close enough to be useful. You mean "symbol", not "var". There might be a var referred to by this symbol, or not. > Is "list" better called a "form" or an "s-expression"? > I think "list" is fine here, although it sounds like you're trying to talk about quoting and backed into invocation. It's important to distinguish between syntax and evaluation semantics. (+ 1 2) is read (parsed) as a a list containing the symbol + and the numbers 1 and 2. Generally, everything in Clojure evaluates to itself, except lists and symbols. Symbols are evaluated to the thing they refer to (skipping the details of how that works and what it means). Lists evaluate each of their elements, then invoke the first element with the rest as arguments. Quoting prevents that evaluation. So quoting a symbol or a list causing it to return just the parsed data (the symbol or the list). There is probably some distinction between form and s-expression but I don't what it is. Form seems less jargony to me (unless you've already studied something like Scheme). I would generally say that either means a single Clojure expression, which can be something as simple as 0 or as complex as a function definition. The Clojure Reader takes a stream of characters and returns a series of forms (which are data). See http://clojure.org/reader. > What exactly is a "scalar"? Is it anything that's not a container? > I don't see that term used with Clojure. I guess what you mean is any Clojure form that is not a collection (list, vector, set, map). Can someone help me with what I'm trying to say? It's OK to oversimplify, > but I don't want to use wrong words that will introduce confusion. Thanks > for the help. > -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.