Hacker News new | ask | show | jobs
by coldtea 3571 days ago
>At this day and age people should be familiar with multiple paradigms. Whether procedural, functional, or Object-Oriented they are all useful.

Why assume that "all are useful"?

I'd say that most of them developed ad-hoc, and whether they are useful or not is subject to actual research on their effectiveness in the field, with controlled studies etc.

Usually PL researchers go the other way around, toy with some things at the language/compiler/syntax/semantics level that think are cool/powerful/expressive etc but rarely bother with actual justification based on those that actually will use the PL, that is programmers.

Which makes the whole field cargo cultish and a pop culture, as Alan Kay notes.

3 comments

Being familiar with different paradigms extends your capabilities, allows you to investigate problems from different angles, and pick the solution most appropriate to the domain.

Even if you learn something 'useless' (either to the current problem or in general), it allows you to discard certain solutions, and know why they are not a good approach.

The flip side of the lack of scientific evidence is that you have no reason to believe that any paradigm you happen to know well is any better than the others. So if you can't trust other people's opinions (which when they are in the form of popularity surveys and shiny blog posts I absolutely agree with), how else are you going to find such evidence than to try using ideas you're unfamiliar with?
They are all useful. Functional: reducing side-effects improves potential for concurrency; Object-Oriented: create a new type and overload operators to make it feel like the abstract mathematical idea it represents; Procedural: subroutines are pretty much indispensable.
Explain why FP doesn't do 'create a new type and overload operators to make it feel like the abstract mathematical idea it represents' better with say, parametric polymorphism?
Just my two cents, but regardless of whether it is a more pure representation, I'd say it is empirically more difficult for the average, object-oriented human to wrap their brain around.

At least on that measure, the object oriented paradigm has demonstrated some success.

I don't see how. One gives you guarantees, one is a lie. I've done a lot of both, the OO model is strictly inferior in almost every way.