hmm, common lisp? maybe not

Maybe arc?

The thing that’s really attracting me to lisp is the fuss about “macros”.

At first sight, it seems that macros in lisp are necessary because the lisp syntax is very poor and limited.

But, what if this is actually a good thing?

One thing I’m concerned about is, what if my day to day python activity consists of (what would in lisp be) manual expansion of macros? (so called patterns).

I’m not aware of many “patterns” in python, but there are things that I wish can be written more succinctly.

Like, instead of saying:

dict(a=a,b=b,c=c)

why can’t I just say:

m_dict(a,b,c)?

The only time in python where ‘symbols’ are treated as ‘strings’ is keyword arguments.

in dict(a=a), the first a ends up being a string ‘a’, and the second a ends up being the actual a.

Django uses this trick to make querying easy, e.g. query.filter(field__is='value')

From the arc tutorial:

One of the things you’ll discover as you learn more about macros is how much day-to-day coding in other languages consists of manually generating macroexpansions. Conversely, one of the most important elements of learning to think like a Lisp programmer is to cultivate a dissatisfaction with repetitive code. When there are patterns in source code, the response should not be to enshrine them in a list of “best practices,” or to find an IDE that can generate them. Patterns in your code mean you’re doing something wrong. You should write the macro that will generate them and call that instead.