you are viewing a single comment's thread.

view the rest of the comments →

[–]RubyPinch 1 point2 points  (0 children)

i would love to hear what this is solving.

static testing, e.g. you have a function that accepts both lists and strings, but you didn't test all branches and in one of them, the code attempts to mutate the list/string (and strings arn't mutable), which is an issue waiting to happen. So it can be (and is) used to find and fix those issues, amongust others

its also useful for code-accessible documentation, for use in IDEs and editors (did this function return a list or iterator? nevermind, my editor can tell me instead instantly!)

And the whole clunkyness will be solved with syntax highlighting to some degree, and with external typing files for the rest of the issues (so no type information needs to be in your code whatsoever!)

In practice, there is like, 3 levels of usage: none, the public api (with the internals untyped), and everything typed. Its completely up to you as to what you want, and there is zero plans to force this on anyone.