The Ruby language came onto the scene in the mid 90’s thanks to a Yukihiro Matsumoto. He was a C++ programmer who wanted to have more fun programming and felt that most languages neglected the human experience of coding. He designed Ruby so that experienced programmers could jump in and immediately start writing powerful code.
To allow programmers from different origins to make sense of Ruby it seems Matsumoto felt it was best to create multiple methods to achieve the same goal, also known as method aliases.
For example, a C# programmer can jump over to Ruby and find parallels like the shared Array.Findall method. Whereas a SQL coder will be happy to find a familiar Array.Select method to achieve the same goal.
While it seems the redundancy allows for experienced programmers to make sense of Ruby faster, it also presents challenges for beginners. Is there a difference between Map & Collect? Reduce & Inject? Select & Findall? The list goes on...
I fall into the camp that believes that the redundancy allows for more freedom and should be appreciated. At its worst, it teaches beginners how to look up methods in Ruby docs and clarify questions that will continue to show up in other fashions as one learns to code.
Reference: https://en.m.wikipedia.org/wiki/Ruby_(programming_language)
Top comments (0)