Fang Jin
1 min readJun 18, 2024

--

Thanks for sharing. There're old school out there doesn't know functional programming. To be honest, I found OOP and FP aren't too different in terms of the goals, they all want to abstract the code into some atomic unit.

However, the execution can be quite different. OOP tends to be territory driven, meaning it wants to have a class to do everything. Whereas, FP tends to be more grannual in the sense, it only tries to lay down small foundation, and then in the end stitch them together. The final class between OOP and FP can be still similar. But the way to approach towards the end is different.

Personally I like FP much better than traditional OOP, because FP feels more like code refactoring exercise most of time, while OOP tends to be more academic but lacks the understanding of the reality. So unless OOP is designed 100% right, it always falls short in the end. This is my two cents, and I understand this can be very wrong ;)

P.S I forgot to mention, I believe your friend did good on the interview, maybe he didn't live to the expectation of the interviewer. Well you can't meet everyone's expectations. Try another company or anywhere who only cares about the interface design other than the coding styles, haha.

--

--

Fang Jin
Fang Jin

Written by Fang Jin

Front-end Engineer, book author of “Designing React Hooks the Right Way” and "Think in Recursion"

No responses yet