you are viewing a single comment's thread
view the rest of the comments
[–] 14 points 1 year ago (3 children)

The most interesting part about Lisp is homoiconicity:

(+ 1 1 2) is literally a list with symbol "+" and 3 numbers.

Which allows to build the most powerful macro possible, manipulating code (with data as a tree-like structures) and changing it into whatever else at compile time.

Now if only there was any good use for macros, this would be the best language 🙃

  • source
  • parent
  • hideshow 3 child comments
  • [–] 11 points 1 year ago (2 children)

    Threading is a great case for a macro.

    (-> x (* 2) (/ 3) (- 1))

    Is the same as (- (/ (* x 2) 3) 1)

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 1 year ago (1 child)

    Sure it's not like it has no uses, but it's something languages have built-in as syntax sugar or operators, and you rarely need to built your own macro for anything.

  • source
  • parent
  • hideshow 1 child comment
  • load more comments (-1 replies)