Nim already does something like this with types. As it is, every time you want to bind a socket to a port, you can't pass in a number, but have to say something like `Port(1234)`. There are similar uses with TaintedStrings and `type SQL = distinct string`. This model could be extended to stuff like having to pass `ConnectedSocket(client)`, `UnboundServerSocket(s)` to certain functions, but that gets tedious.
Also similar, and also with blocks: [guards and locks](https://nim-lang.org/docs/manual_experimental.html#guards-and-locks). So I think the `disallowTag` RFC is interesting.