OK. Thanks for both ! Now I understand it better.

On Sunday, August 16, 2015 at 9:49:17 PM UTC+2, Stefan Karpinski wrote:
>
> Sorry, yes, I misread the example. They're both fine with just 0.
>
> On Aug 16, 2015, at 2:32 PM, Stefan Karpinski <[email protected] 
> <javascript:>> wrote:
>
> One is being returned, the other isn't. You cannot change line 8 without 
> causing the returned type to depend on the value.
>
> On Aug 16, 2015, at 10:10 AM, Sisyphuss <[email protected] <javascript:>> 
> wrote:
>
> In the Rational.jl 
> <https://github.com/JuliaLang/julia/blob/master/base/rational.jl> :
>
> In Line 8: `num == den == zero(T)` uses `zero(T)` to represent 0
> In Line 9: `g = den < 0` uses `0` to represent 0
>
> Why this difference? My intuition tells me that in Line 8, it can be 
> replaced by 0 without performance issue.
>
>
>

Reply via email to