This is an automated archive made by the Lemmit Bot.

The original was posted on /r/programminglanguages by /u/Cuervolu on 2024-09-08 15:15:55+00:00.


Method overloading is a common feature in many programming languages that allows a class to have two or more methods with the same name but different parameters.

For some time, I’ve been thinking about creating a small programming language, and I’ve been debating what features it should have. One of the many questions I have is whether or not to include method overloading.

I’ve seen that some languages implement it, like Java, where, in my opinion, I find it quite useful, but sometimes it can be VERY confusing (maybe it’s a skill issue). Other languages I like, like Rust, don’t implement it, justifying it by saying that “Rust does not support traditional overloading where the same method is defined with multiple signatures. But traits provide much of the benefit of overloading” (Source)

I think Python and other languages like C# also have this feature.

Even so, I’ve seen that some people prefer not to have this feature for various reasons. So I decided to ask directly in this subreddit for your opinion.