A case for inline type annotations

Even better, here is the relatively small URI module from Elixir. Can you go through every function and type them according to your proposal? elixir/lib/elixir/lib/uri.ex at main · elixir-lang/elixir · GitHub - the new type system would be quite similar to the existing specs, so that’s a good reference, but I can write a complete version as a follow up to yours. This will allow us to move the discussion into actual working code, rather than one-liners or fictional examples. Otherwise, we will all be guessing what you actually meant, which is not fair to you (nor anyone else).

4 Likes