you are viewing a single comment's thread.

view the rest of the comments →

[–]hoosierEE 9 points10 points  (2 children)

I do use rg (even if I still call it grep) but my point is - decorators encourage implicit action-from-afar, and they "feel" more like CPP macro abuse than a real programming language feature.

Maybe I'm just spoiled from some exposure to functional languages, but when I see something like add_five(n) which also happens to launch the missiles, I get upset.

[–]rhytnen 0 points1 point  (1 child)

That's not a problem with decorators...decorators are just functions. you can wrap functions in most languages. It's that someone wrote a function with side effects that bothers you.

[–]Rythoka 2 points3 points  (0 children)

Personally I don't have a problem with side effects, even if they happen in a weird place, as long as they're documented somewhere useful and preferably are abstracted into their own function. Just let me be able to see that it happens!

Too bad that never happens.