News for hackers. Stuff that matters.
Re:The state of type hints in Python by tadzik_ on Thursday June 21, 2018 @02:59AM (#17362753)
Sounds like what Perl 6 does :) You can add optional type signatures, and you get compile-time checks disallowing impossible usages of these:

  > sub takes-string(Str $foo) { }
  sub takes-string (Str $foo) { #`(Sub|94327719210888) ... }
  > takes-string(5); say "Hi!"
  ===SORRY!=== Error while compiling:
  Calling takes-string(Int) will never work with declared signature (Str $foo)
  ------> <BOL>⏏takes-string(5); say "Hi!"

There are no comments on this comment yet.