> 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 overloading, when I look at 
function/procedure, the first thing I look is the return type. If it's 
overloaded with another type, it'll confuse me a lot.

Also, type inference helpful when there's a case you don't have to import that 
specific type but still use that as argument for another functions.

Furthermore, just make a `template` or `macro` to resolve it. Nim already 
flexible enough and with those, how far the flexibility is in your own.

Reply via email to