[julia-users] Re: methods ambiguity

2016-04-20 Thread Cedric St-Jean
Julia has parametric types though. f{T}(x::Vector{T}, b::Int) = 1 f{T<:Real}(x::Vector{T}, b) = 2 f([1,2], 5) On Wednesday, April 20, 2016 at 7:43:08 AM UTC-4, Tamas Papp wrote: > > On Monday, April 18, 2016 at 9:38:40 PM UTC+2, Steven G. Johnson wrote: >> >> >> >> On Monday, April 18, 2016 at

[julia-users] Re: methods ambiguity

2016-04-20 Thread Tamas Papp
On Monday, April 18, 2016 at 9:38:40 PM UTC+2, Steven G. Johnson wrote: > > > > On Monday, April 18, 2016 at 10:38:28 AM UTC-4, Didier Verna wrote: >> >> >> Julia warns you when there's an ambiguity in method specificity, and >> picks one "arbitrarily" (according to the manual). I guess arbitr

Re: [julia-users] Re: methods ambiguity

2016-04-19 Thread Jeffrey Sarnoff
+1 (what Stefan said) Is there a way to auto-generate something appropriate that takes care of the ambiguity with Bool that pops up frequently, for numerical methods that never intend being called with Bool arg(s)? On Tuesday, April 19, 2016 at 3:08:20 PM UTC-4, Stefan Karpinski wrote: > > I'v

Re: [julia-users] Re: methods ambiguity

2016-04-19 Thread Stefan Karpinski
I've always felt that arbitrarily breaking a tie is just asking for trouble when ties actually occur since the choice that's made is rather likely to be wrong. At this point it seems fairly clear that definition-time warnings about method ambiguities are usually too annoying, especially between unr

[julia-users] Re: methods ambiguity

2016-04-18 Thread Steven G. Johnson
On Monday, April 18, 2016 at 10:38:28 AM UTC-4, Didier Verna wrote: > > > Julia warns you when there's an ambiguity in method specificity, and > picks one "arbitrarily" (according to the manual). I guess arbitrarily > doesn't mean random. Is there a particular reason for not > standard