@lud I agree that you brought up typealiases (even before I mentioned) and I’m aligned with your thinking and examples – I should have called out this alignment more, instead of focusing on just the counter-intuitiveness of how this example’s signature was written.
I think Jose derailed a bit by stating I found this particularly confusing in the other example you posted and Not only it is repetitive and confusing, it also means we are incapable of expressing function overloads when it wasn’t my original code, and the only modification was going from String.t() | nil to String? to illustrate optional types will improve clarity and conciseness.
Do we all agree that this %URI{host: host} :: URI.t()) :: String.t() | nil is more concise+readable with optional type sugar (?) and typealiases, as you first mentioned? I would think the answer is universally “yes”.
The real debate is that even with modern syntax (typealiases, optional type String?, and potentially others), do inline types still not fit with elixir? Is $ just that much better for this language? Let’s continue on that path..






















