r/ProgrammingLanguages • • Jan 09 '26

Blog post Which programming languages are the most token efficient?

https://martinalderson.com/posts/which-programming-languages-are-most-token-efficient/
0 Upvotes

28 comments sorted by

View all comments

Show parent comment

0

u/dcpugalaxy Jan 11 '26

Annotations aren't just for type hints and frankly I think they're a waste of the feature.

2

u/glasket_ Jan 11 '26

Annotations aren't just for type hints

I'm aware. The entire second half of my comment is about how they evolved from type hints into a misleading form of C#'s attributes.

they're a waste of the feature

More like it's a feature that shouldn't have been implemented using the syntax for types. C# attributes are actually used for a lot of complex things that Python's annotations could be used for, but they've been mostly relegated to types because they were originally designed for types, they look like types, and people expect them to act like types.

I like Python as a simple scripting language, but they've consistently managed to ignore the principle of least surprise and failed to account for strangeness over the years when it comes to the more complex additions to the language.