Re: [julia-users] Re: Guidelines for overriding Base.convert?

2015-06-25 Thread Sheehan Olver
OK I submitted issue #11874 > On 26 Jun 2015, at 2:06 pm, Stefan Karpinski wrote: > > Thanks! > > On Thu, Jun 25, 2015 at 11:12 PM, Sheehan Olver > wrote: > Yep I'll open an issue with Simons example. I had another issue which hadn't > narrowed down the problem

Re: [julia-users] Re: Guidelines for overriding Base.convert?

2015-06-25 Thread Stefan Karpinski
Thanks! On Thu, Jun 25, 2015 at 11:12 PM, Sheehan Olver wrote: > Yep I'll open an issue with Simons example. I had another issue which > hadn't narrowed down the problem which I'll replace > > Sent from my iPhone > > On 26 Jun 2015, at 12:55 pm, Stefan Karpinski > wrote: > > Yes – adding a nor

Re: [julia-users] Re: Guidelines for overriding Base.convert?

2015-06-25 Thread Sheehan Olver
Yep I'll open an issue with Simons example. I had another issue which hadn't narrowed down the problem which I'll replace Sent from my iPhone > On 26 Jun 2015, at 12:55 pm, Stefan Karpinski wrote: > > Yes – adding a normal method should never segfault. Can you open an issue? > >> On Thu, Jun

Re: [julia-users] Re: Guidelines for overriding Base.convert?

2015-06-25 Thread Stefan Karpinski
Yes – adding a normal method should never segfault. Can you open an issue? On Thu, Jun 25, 2015 at 6:33 PM, Sheehan Olver wrote: > Is that a bug in Julia that wrongly overloading convert is an unsafe > operation? > > Sent from my iPad > > On 26 Jun 2015, at 12:22 am, Simon Byrne wrote: > > For

Re: [julia-users] Re: Guidelines for overriding Base.convert?

2015-06-25 Thread Sheehan Olver
Is that a bug in Julia that wrongly overloading convert is an unsafe operation? Sent from my iPad > On 26 Jun 2015, at 12:22 am, Simon Byrne wrote: > > For abstract types it is acceptable to return an instance of a subtype, e.g. > > convert(Integer, 1.0) > > Otherwise, I suspect you are in fo

[julia-users] Re: Guidelines for overriding Base.convert?

2015-06-25 Thread Simon Byrne
For abstract types it is acceptable to return an instance of a subtype, e.g. convert(Integer, 1.0) Otherwise, I suspect you are in for all sorts of trouble, e.g. julia> import Base.convert julia> immutable Foo x::Int end julia> function bar(x) y::Foo y=x