10 ms·
Do they do something neat with the colon? I do prefer the shorter keyword syntax, at least in Clojure because of how common they are. Clojure tends to use them
by everforward 1mo ago
Do they do something neat with the colon? I do prefer the shorter keyword syntax, at least in Clojure because of how common they are.
Clojure tends to use them very heavily though, and last I looked it seemed like Racket used more lists (as a matter of community preference, not forced by the language).
- packetlost 1mo agoRacket's lineage in Scheme is probably the reason it prefers lists over pretty much every other datastructure
- tmtvl 1mo agoA colon in Guile is just a regular character. For example: (define abc:def 3) (define :ghi 4) (* abc:def :ghi) ; => 12 In Common Lisp a colon is a package separator, with an optional package which defaults to the keyword package if not given. (eq :foo keyword:foo) ; => t I don't know about Clojure or Racket because I don't know much about Clojure or Racket. I know Clojure differs in various ways where syntax is concerned to Common Lisp or Scheme (I do like the idea of using square brackets to visually indicate that a collection of atoms may not represent a function call, I hate the idea of the comma being a whitespace character) and that Racket has different languages (though I don't know what that means in practise). That said, I don't quite know what to think of your third sentence: > Clojure tends to use them very heavily though, and last I looked it seemed like Racket used more lists I suppose them refers to keywords? But Racket uses more lists compared to how much Clojure uses keywords? As lists have more uses than keywords that seems likely, though as I said: I don't know anything about Clojure or Racket apart from Racket once being called PLT Scheme.
- shawn_w 1mo agoGuile keywords use the same #:foo syntax as Racket. The reader can also accept :foo or foo: notation. https://doc.guix.gnu.org/guile/latest/en/html_node/Keyword-Read-Syntax.html https://doc.guix.gnu.org/guile/latest/en/html_node/Keyword-R...