> C++, Java, Dlang, C# etc don't allow this either... But IMSHO (in my humble
> stupid option) it would still be a good idea.
Ada allows overloading on return type, but doesn't have type inference or
implicit converters, which complicate things quite a bit. I get the impression
that Araq is
Thanks for the solution and explanation, stisa! The change you suggested solved
the problem.
> Overloading by return type would only work when assigning to something that
> has a declared type, otherwise (if using discard or expecting type inference)
> you'd get an error.
That's what araq meant with defeating Nim's type inference.
In my case, I too don't like about return type
[C++, Java](http://www.geeksforgeeks.org/g-fact-75/), Dlang,
[C#](https://stackoverflow.com/questions/20705643/method-overloading-with-different-return-type)
etc don't allow this either... But IMSHO (in my humble stupid option) it would
still be a good idea.
I thought Nim's philosophy was to