1. 6
  1.  

  2. 3

    Interestingly enough, return type overloading is supported by the JVM but not by Java, nor by any JVM language that I know of. I think I ran across this while trying to figure out how to override an overloaded method in Clojure using gen-class

    1. 2

      Rust doesn’t have any overloading, but still has such feature thanks to type inference:

      let i: i32 = "123".parse()?;
      let b: bool = "true".parse()?;
      let x: Ipv4Addr = "1.2.3.4".parse()?;
      

      parse() uses FromString trait, and the compiler uses backwards deduction to figure out which one.