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

All true.

But also:

> It just turns out that homoiconicity is not hugely useful the large percentage of the time that you don't need metaprogramming,

It turns out that metaprogramming, like anything else, has many possible levels, and that for the shallower levels, Python's reflection, magic methods, and metaclasses suffice without too much heartburn.



Honestly I feel like even metaclasses are overused, where class decorators would often suffice.


That's probably true, but there are a few reasons for it:

- Face it, decorator syntax is kinda ugly

- History. Decorator syntax is new

- For things which will be repeatedly subclassed, the metaclass automagically tags along

But it's almost certainly easier for a maintainer to look at a decorated class and figure out what's going on.




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

Search: