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

It is very close to python's @ syntax on top of methods definitions.

Like:

@get('/posts')

mymethod

  ...


? no, it's not.

look at https://python-aspectlib.readthedocs.io/en/latest/ for an example of using aspect with python


Python decorators are a (limited) form of AOP: they let you transform functions in-place to implement cross-cutting concerns. Aspectlib allows you to do a more intrusive form of AOP.


Decorators and AOP are very similar concepts in my opinion then, if you prefer.




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

Search: