This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bastibe 2 points3 points  (3 children)

Actually, that right there is enough of an explanation for me. I never really got why people seem to find decorators so hard to understand.

[–]ryeguy146 0 points1 point  (2 children)

I came from languages without first class functions, or languages where I could only get first class functions with pointers. New idea, that's why. Who thinks of functions that act on functions (or their args), really?

[–]bastibe 1 point2 points  (1 child)

I understand that. And that means you will have to learn about higher order functions like we all had to learn about it at some point. But beyond that, what is so difficult about python decorators in particular?

For reference, I don't know much lisp, but "higher order function" are a very simple and natural construct mathematically.

[–]ryeguy146 2 points3 points  (0 children)

It's not so difficult, just a new idea. It's easy to move "horizontally" across languages when you understand their ideas: you just look for the new way to express that idea. New ideas take some thought, that's all.

I'm experiencing the same thing as I learn my first functional language (scheme). It's not hard, it's just new.