DEV Community


Discussion on: Refactoring - How did we end up in this mess?

aleksikauppila profile image
Aleksi Kauppila

Thanks for this post Peter!

It’s so easy to say some design is and in hindsight. If we had the knowledge we now have we’d go a different route 🙂

Just goes to show that every decision matters.

I'm now moving back to using static classes and methods where it makes sense. This is driving back toward more of a functional programming approach

I may be totally off here, but it sounds like going back to a more procedural approach and will most likely do a disservice to your software. What do you think?

cheetah100 profile image
Peter Harrison Author

Linking functional programming with static methods is probably a mistake, but I've been reading some interesting critiques of OO which got be thinking about why singletons are used when state is not being maintained. I know there are some benefits from singletons, but increasingly these are also under attack by functional programming fans. However my mistake was linking static methods and functional programming.

This raises a question. If you have an existing Java application should I even try to shift to functional programming? Can they co-exist? Is there a bridge? I don't really have the perspective and am happy to get advice from others.

Forem Open with the Forem app