Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm really sorry, but if you think those topics above are "shallow", I don't think we have much to talk about and should probably agree to disagree.

> Can you explain when (if ever) a person should use an OOP approach and when (if ever) he/she should use a functional approach to implement a system?

I can, and have done several times, actually, for different systems.

> I don't think those fundamentals listed above help me

The list I gave was not exhaustive. You asked yourself for "concrete examples" and I gave examples.

The reason I can't answer hard questions in a simple message is exactly because those foundations are not "shallow" at all.



> I can, and have done several times, actually, for different systems.

The reason I asked that question isn't to be argumentative, it's because, IMO, the answer to those types of questions are exactly what does not exist in the software engineering world.

And talking through the details of our different opinions is how we can understand where each one is coming from and possibly, maybe, incorporate some new information or new way of looking at things into our mental models of the world.

So, if you do think you have an answer, I am truly interested in when you think OOP is appropriate and when functional is better suited (or neither).

If someone asked me that question, I would say "If we're in fantasy land and it's the first system ever built and there are no variables related to existing systems and supportability and resource knowledge, etc., then I really can't answer the question. I've never built a system that was significantly functional, I've only built procedural, OOP and mixtures of those two with sprinklings of functional. I know there are significant pros to functional, but without actually building a complete system at least once, I can't really compare"


You asked whether one should use OOP or FP to implement a system.

I can answer that, and did in the past, as I have done projects in both OOP and FP. But before I answer, I ask follow-up question about the system itself, and I will be giving lots of "it depends" and conditions.

There is no quick and dirty rule that will apply to any situation, and it's definitely not something I can teach in a message board.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: