Settings

Theme

Ask HN: Which language has the clearest type syntax?

6 points by r2b2 2 years ago · 7 comments · 1 min read


Or, what would be your ideal type syntax?

ttymck 2 years ago

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_ 2 years ago

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

aristofun 2 years ago

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?

  • zwnow 2 years ago

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

    That's a very bold statement for a Javascript layer that allows unsound typing behavior. While Typescript introduces some typing functionality please do not compare it to actual languages that type check properly.

    • aristofun 2 years ago

      Sorry, we, simple down to earth developers, have had enough of that "sound" bullsh*t! :)

mikewarot 2 years ago

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 2 years ago

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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection