
Lisp is Changing My C++ - mqt
http://www.jakevoytko.com/blog/2008/10/06/lisp-is-changing-my-c/
======
meredydd
_Sometimes, the answer is no. Some boilerplate code (like exception catching)
is an overhead that can not be avoided_

[...]

 _I’m still looking for my “Lisp Enlightenment” with respect to macros_

That enlightenment is just this: _"boilerplate code that cannot be avoided"_
is an oxymoron. If it's boilerplate, it's macro-able, and exception handling
is no different.

I don't know your code, so I can only suggest that you take another look at
those boilerplate segments you think "cannot be avoided". Find even the
smallest thing they have in common - whatever makes you call them
"boilerplate". Now invent some fantasy syntax that would make that overlap go
away. Now write the macro to make that syntax work. Rinse, repeat.

Warning - Once you're used to thinking like this, it is my experience that
returning to a language without metaprogramming will become considerably more
painful...

~~~
scott_s
I think the author meant "some boilerplate code _in C++_ (like exception
catching) is an overhead that can not be avoided."

~~~
meredydd
_I think the author meant "some boilerplate code _in C++_"_

It's possible. But once you've acknowledged that boilerplate code is
inevitable in one language but not the other, that _was_ The Macro
Enlightenment(tm) - you just had it.

~~~
scott_s
Maybe the first half. The second half would be how to write such code.

------
dazzawazza
Learning Python did the same thing for me. Infact I'd go as far as to say
Python has made me a significantly better programmer.

