Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Well, I like Lisp, too. But the macros are not really good, but they are basically buggy ('non-hygienic'), and it took a few years to realise and repair that. Look at Scheme or Racket instead.


sort by: page size:

I hear LISP has a pretty good macro system...

Lisp macros?

Almost every language has macros now. Lisp is pointless.

Every Lisp ever, as well. Textual macros like C's are useful if they're all you have, but definitely one of the worst options if you have a choice of macro systems.

Well, I wouldn't exactly say that Lisp (CL) is functional. Also, if you're referring to macros then that's fair.

Compare to lisp macros?

I was under the impression Lisp macros are more powerful/flexible than Rust's macro_rules! macros, although I don't know enough about Lisp macros to be sure.

I suppose that's a good point. Lisp programmers seem to enjoy macros quite a bit, and so I guess those things do work well together.

Lisp macros

In a lisp-1 like Scheme it's a lot easier to shoot yourself in the foot with unhygienic macros.

IIRC the macro engine is backed by lisp... tinylisp?

But it does have Macros. Being able to write a macro that changes the AST is pretty awesome. Definitely a LISP.

Eh, lisp macros are nothing more than a way to avoid quoting your symbols. Functions are more clear, and do not try to hide what is going on. Honestly wish it was like this: (defun 'my-adder '(x y) (+ x y)) ;; emacs lisp.

I'm a lisper and clojure user. Those are my main languages. Don't get the hype for macros, but lisp is the best.


Common Lisp do have optional typing though, and hygienic macros is a controversial subject. Dialect scoping is cool though

I love Lisp as much as the next neckbeard, but macros aren't unique to Lisp and they aren't the only kind of compile-time execution.

It's tough to come up with a better syntax than sexprs for writing macros in, that's clearly true. A number of recent languages have managed good-enough macros, Nim and Rust being two examples.


Does it have anything comparable to Lisp macros ?

With a straight face - how can you do anything better than macros in Lisp? I’ve always thought of them as the Platonic ideal of macros. What are your problems with them?

I think the Scheme and Racket communities would take issue with your claim that lisp-2 languages are more suitable for writing macros than their respective languages :)

I like Lisp precisely because syntax is too important to be left to programming language designers.

No other language family has true macros. Lisp does, because it takes syntax seriously.

next

Legal | privacy