Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin
What is boilerplate? and why is Lisp so good at reducing it?
2 points by morphir on Nov 16, 2009 | hide | past | favorite | 7 comments
What exactly is boilerplate? and why is Lisp so good at reducing it?


Boilerplate is an implicit abstraction: recognisable generality, but lacking a coded mechanism.

These could always be manually transformed to fit standard abstractions, such as functions or classes. But Lisp's macro facility instead allows them to be captured more 'directly'.

Now, whether fewer standardised abstractions is better/worse than more various tailored abstractions, is a deeper question . . .


A perfect example is Java's getters and setters, which follow a completely regular pattern but still have to be coded individually.


This wikipedia entry is a decent introduction, discussing pros and cons of repetition-reducing abstractions (DRY) in a language-independent way.

http://en.wikipedia.org/wiki/Dont_repeat_yourself


your link doesn't work. Try this one instead. http://en.wikipedia.org/wiki/Don%27t_repeat_yourself I was not aware there was a term for this. Also called DIE (Duplication is Evil).


Thanks for the updated link. Mine was a cut/paste from the Chrome address bar. A bug maybe.


I initially thought recursion where less cpu intensive than traditional for-loops. Is this even true?


No one can answer that question accurately without discussing specific implementations of specific programming languages.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: