ls and objects functions are both from the base package and are exactly the same as discussed here. I've seen other examples of duplicated functions (in the tidyverse and base if I remember correctly). To me, having this type of functions juste make the code less clear by introducing more and more functions.

I don't see neither the interest of having duplicated functions in different packages (as we can load packages B, C, D while loading package A).

What is the point of having duplicated functions? Is this type of functions just a remain from the past due to the long existence of an open source language?

closed as primarily opinion-based by gnat, TheCatWhisperer, BobDalgleish, Bart van Ingen Schenau, Jörg W Mittag Dec 7 at 20:12

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

I'd say there are four common reasons why:

  • Historical / Legacy
    • They may have come from different places, or been different once upon a time and slowly became the same.
  • Lack of Knowledge / Misunderstanding
    • They may have been created by different people and are accidentally the same. Maybe they were created, under a false assumption about the other one.
  • Personal Taste
    • The developer just wanted it called a different thing that is more intuitive for them.
  • Further Control
    • The code may be the same now, but that may not always be true. Perhaps a developer feels they have the right to change one of the functions, or at least wants to reserve the right to do so.

Not the answer you're looking for? Browse other questions tagged or ask your own question.