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

If it supported infix notation (outside of reader macros), it wouldn't be Lisp.

  • source
  • parent
  • hideshow 3 child comments
  • [–] [S] 1 point 1 week ago (2 children)

    Why not? Is LISPs only, and major quality, polish notation?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 7 points 1 week ago

    Yes. Well, sort of.

    The actual quality is homoiconicity, meaning that code in the language is represented in the language's own data structures (beyond the entire source file being a string). This enables structural macros - using the language to manipulate code before execution.

    Some languages have tried to do this without the language syntax actually being data structure literals. Rust does it, but a typical Lisp macro looks like a simple template where some things are marked to happen at compile-time and others get spliced in at runtime. Rust macros don't beyond the most trivial examples.

  • source
  • parent
  • [–] 4 points 1 week ago

    To add to the point about homoiconicity, both the article and my toplevel comment mention thread macros. The article talks about them being equivalent (syntactically at least) to method chaining, which I agree with.

    The thing is, to get method chaining, the language has to have an object system, and the functionality you want to use has to be written in an object-oriented style. To get a thread macro, you need ten lines of code (aside from the docstring and metadata).

  • source
  • parent