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

5

u/dskippy Jan 09 '26

That type declaration is optional though and the work Haskell does that you described is there even if you omit the types. The only difference being that you get a type of Num a => a -> a -> a instead of Int. But had you written that type, then removing the optional type would have made zero difference.

I guess the question is what does token efficiency really mean? Because you can absolutely write this program in fewer tokens in Haskell than the Python version.

3

u/ExplodingStrawHat Jan 11 '26

On the same note — one could eta-reduce twice to get intAdd = (+)