Or in this particular case, maybe their should be some functionality like 
that in Base, or at least in Base.LinAlg, where is often necessary to mix 
complex variables and real variables of the same type used to build to 
complex variables.

Op donderdag 26 februari 2015 08:10:35 UTC+1 schreef Sheehan Olver:
>
> Maybe a better alternative is to create an internal function with the same 
> name: 
>
>         real(v…)=Base.real(v…) 
>         real{T<:Real}(::Type{Complex{T}})=T 
>         real{T<:Real}(::Type{T})=T 
>
> This will avoid the override leaking from the package. 
>
>
>
>
> > On 26 Feb 2015, at 6:07 pm, Sheehan Olver <[email protected] 
> <javascript:>> wrote: 
> > 
> > I think this is a case where I know the answer but pretending I don’t :) 
> > 
> > 
> > 
> >> On 26 Feb 2015, at 6:06 pm, Ivar Nesje <[email protected] <javascript:>> 
> wrote: 
> >> 
> >> We have seen quite a few instances where Base functions were extended 
> with methods without restriction to non-Base types, and it caused problems 
> when Julia was updated. 
> >> 
> >> Is randomly breaking in new versions of Julia your style? 
> > 
>
>

Reply via email to