On 06 Jul 2014, at 13:46, gentlebeldin <[email protected]> wrote:

> That's very strange, Julia should know your code is wrong, and it may tell 
> you so, if you ask the right question: 
> julia> code_typed(bar(b, "wat"))
> ERROR: no method bar(B,ASCIIString)

Right. Almost any kind seemingly inconsequential of tinkering with the code 
will also make Julia come to that conclusion. The thing is, I'm actually not 
convinced my original code *was* wrong -- it just dispatched to the wrong 
implementation (as here -- just that here, there's no actual, functioning 
alternative). I may be wrong about that, but my point is that just "fixing my 
code" won't solve the problem in my case. I actually want my code as it is (or 
so I think; there may be errors I haven't noticed), but without the infinite 
recursion :-}

So getting the proper method error here is sort of a proxy for that. (Or so I 
think.)

-- 
Magnus Lie Hetland
http://hetland.org


Reply via email to