Does the programming language that follows only one paradigm have any advantage?

Asked

Viewed 64 times

4

Programming languages that have only one paradigm such as Haskell (functional programming) or Smalltalk (object-oriented/message-oriented) benefit from focusing fully on that paradigm?

  • What are the losses/gains of a programming language having more than one paradigm?
  • Is that good or bad for us who are developing software? (This is very personal to each one, so it will be based on your experience)

Reference: Wiki

1 answer

3


Having only one paradigm gives a sensational advantage, the language is simple. but there’s a downside, it gets too simple for most problems, so simple.

But there’s a problem with all of this. Some people, myself among them, consider that there are only four paradigms. I’ve talked about this in What is a paradigm?. In general, one prevents the other, so we have to consider that language can only have one paradigm, never two (it is possible to have more than one in the same language as long as it does not use one of them in the same way as another, which would make little sense to have this ability). There may be some secondary paradigms that influence language, even one of the main ones can inspire language in some style, without imposing as a paradigm. These secondary styles, which usually cannot be used alone, and especially what is orientation cannot be put on the same level.

Most secondary paradigms concern only one part of the code and are often not used in any specific solution, therefore optional.

Even Smalltalk generates controversy if it has only object orientation. And in fact the creator himself already admits that he did something else there and is not quite object-oriented, and also admits that he has languages that were never considered object-oriented and are more object-oriented than Smalltalk (Lisp and Erlang).

Did the languages cited in the question succeed? I think that explains a lot, right? Haskell’s creator says that he has created a language that serves no practical purpose. I am not talking about the quality of them. You think people would stop using something clearly good for everything they need?

Having more than one paradigm, if you can say so, helps language to be more expressive to different problems, and of course makes it more complex.

This complexity is general: in specification, in implementation, in documentation, in use.

Everything is good or bad according to the point of view. If it were only bad it would not exist, if it were only good it would only exist like this.

You can’t even say that C has only one paradigm but it’s the only language I know that’s simple and didn’t end up in a very small niche. Some will say that even stayed yes, It depends on what each one sees the size of this small, this is very subjective. And C achieved the success it had for lack of something better at the time and because its merit is to be the portable assembly of computing, not because it is of only one paradigm.

This Wikipedia page is one of the worst I’ve ever seen about software development. Whoever did this didn’t come from a study. There are no paradigms, some are not or do not make sense. There is a hierarchy that I do not know where it came from and how correct it is. But if you consider that, it’s impossible for a language to have a single paradigm.

Remembering that we can adopt a secondary paradigm in languages that do not support it directly with greater or lesser ease. Paradigm has more to do with how you write the code than with the language that might have one that facilitates or encourages this style, which is something especially valid when it comes to secondary paradigms. In general we can only say that a language adopts a certain secondary paradigm by some syntax sugar that he provides.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.