Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I, of course, understand the "Puom" koan, but I am not sure how to explain it to my friend... can anyone help?


I think that there are a couple of pieces.

Repetition is better than using a bad abstraction. While it has its issues, repetitive code is still idiomatic and readable code that can be understood with a working knowledge of the language. Introducing abstractions requires that the reader now understand the complexities of the abstraction. Introducing a sufficient number of bad or leaky abstractions can render code impossible to understand.

Good abstractions are difficult to create, especially when you must abstract over functionalities that are subtly different but not in a consistent manner.

Macros (like any code generation tool) are powerful but difficult to use. They are also arcane, in that they allow you to roam well beyond idiomatic style and to employ syntax of your own invention.

It follows then that in most scenarios where you imagine you could "clean up" your code with macros you in fact can't, or you might spend an unreasonable amount of effort trying with limited success. Even if you do succeed, you might render your code incomprehensible to anyone other than yourself in the course of your macro-fication.


She strive to have a code with no repetitions, just like their language. As such, if you try and go too far, it might become as understandable as their language.




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

Search: