Hacker News new | ask | show | jobs
by typedweb 4054 days ago
How about syntactic extensions:

    (defmacro unless (test &body body)
      `(if (not ,test) ,@body))
1 comments

That's a theoretical problem, not a real world problem.
I'm not quite sure how being able to extend syntax is a theoretical problem. It was just a basic example for brevity.

There are many more examples of macros that solve real world problems, such as writing a compiler for an embedded DSL that is tuned to solving your real problem that allows expressivity and brevity that you would never see without the use of macros.