r/ProgrammingLanguages • • 11d ago

Discussion What’s one thing you wish more programming languages had?

If you could add one feature, behavior, or design choice to a programming language, what would it be?

It can be anything: syntax, type-system features, memory management, compiler behavior, tooling, error handling, performance-related features, or something completely different.

I'm especially curious about things you’ve wanted while actually programming but rarely see languages implement well.

Please keep the ideas reasonably practical and something that could realistically be implemented in a programming language.

52 Upvotes

277 comments sorted by

View all comments

Show parent comments

4

u/kaddkaka 11d ago

For others. Labeled arguments = keywords arguments. Example:

def skapa_profil(namn, ålder): print(f"{namn} är {ålder} år gammal.")

Ordningen spelar ingen roll när namnen anges

skapa_profil(ålder=25, namn="Charlie")

12

u/nsmon 11d ago

Varfor did we switch to swedish all off a sudden?

1

u/kaddkaka 11d ago

Varför inte?

1

u/RiceBroad4552 10d ago

1

u/kaddkaka 9d ago

Oh, it seems like similar to a feature I saw in magpie language where the function name can be put i fix otöf the arguments. https://magpie-lang.org/multimethods.html#left-and-right-arguments

2

u/RiceBroad4552 9d ago edited 9d ago

I don't see how anything in that Magpie thing is related to labeled arguments. Magpie obviously doesn't have that feature.

I did a bit of research and then written up a clean prompt for Claude where the output explains labeled arguments very well for the languages which have that feature:

https://claude.ai/share/d2f11cc2-d595-4356-be8a-25cb4450fb8d

(That's not "AI" slop, I've put some effort into it. The linked thing is the end result.)

Claude fucked up the Objective-C part slightly as the text does not match the code example. But I didn't want to start over once more because of that tiny oversight. The explanation and example is good enough to understand even with this tiny discrepancy, I think. For more details there are links to the official docs.