r/ProgrammerTIL • u/TheEasternSky • Apr 15 '21
Java TIL: There's a new paradigm called AOP (Aspect Oriented Programming) where you can treat things like function entry/return as events and write code in a separate place for such events
69
Upvotes
114
u/[deleted] Apr 15 '21
Not sure where you got the impression that AOP is new...
40
u/mephju Apr 15 '21
Am I the only one who thinks the whole premise of this approach is bad to begin with? Why would you want that sort of magic in your code? I always try to reduce magic. Wysiwyg functions for the win.
7
u/iiiinthecomputer Apr 15 '21
Code annotations are new now?
4
u/strcrssd Apr 15 '21
AOP is great for cross cutting concerns (logging, security, etc.) but it's not a new paradigm at all. It's a layer on top of OOP.
7
u/snot3353 Apr 15 '21
"new"
But seriously, this is how a lot of Spring Framework does a lot of its magic.
3
u/[deleted] Apr 16 '21
New being in 2001? There's a reason it never took of. It's shite.
5
u/mikkolukas Apr 15 '21
Where did you get the idea that this was new?
It is more than 20 years old.
7
u/lithium Apr 15 '21
Perfect demonstration of modern software developers. Learn about a paradigm today, completely misunderstand its history (and likely its implementation) but push ahead and begin evangelising for it immediately despite never having used it to ship a non trivial piece of software or any software for that matter. Rinse and repeat tomorrow.
-7
u/vVv_Rochala Apr 15 '21
is this what react is
0
u/[deleted] Apr 15 '21
[deleted] — view deleted comment