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 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 
>>>   standardizing a tie-breaker (possibly the one currently in use) ? 
>>>
>>
>> Because any practical tie-breaker rules are probably too complicated to 
>> be useful?
>>
>
> The tie-breaking rule of CLOS (lexicographic/left to right) doesn't look 
> so complicated, especially given that Julia has no multiple inheritance or 
> method combinations.
>
> Best,
>
> Tamas
>

Reply via email to