HACKER Q&A
📣 r2b2

Which language has the clearest type syntax?


Or, what would be your ideal type syntax?


  👤 ttymck Accepted Answer ✓
I find Scala to be the most readable, but perhaps that's only because it's the one I learned typing and type level programming with.

Rust, by comparison, is much less readable to me, with very confusing ordering and operators. Although I'm sure someone can explain why it is superior to Scala in one way or another.


👤 andrei_says_
Elm has a great implementation of typing - from definition to enforcement to error messages.

👤 aristofun
Not sure what you mean by “clearest”, but TypeScript is the best typing system ever invented.

For 1 simple reason - it is flexible enough to have just as much typing as you want in every case.

Is there any other popular language that can be statically and dynamically typed at the same time?


👤 mikewarot
I think Free Pascal has the best syntax, it's clear what's what, and it has an insanely useful set of string types that just get handled for you. No malloc, free, etc.

👤 wscourge
There's Idris, designed to encourage "Type-Driven Development".