Re: [julia-users] Preventing Bool<->Number conversion/promotion

2016-10-31 Thread Stefan Karpinski
See #18367 and #19168 . On Mon, Oct 31, 2016 at 3:06 PM, Stefan Karpinski wrote: > At the moment no, although there's been discussion of making Bool not a > subtype of Number. > > On Mon, Oct 31, 2

Re: [julia-users] Preventing Bool<->Number conversion/promotion

2016-10-31 Thread Stefan Karpinski
At the moment no, although there's been discussion of making Bool not a subtype of Number. On Mon, Oct 31, 2016 at 2:29 PM, Penn Taylor wrote: > Is there a way to prevent automatic conversion/promotion between Bool and > Number types? > > Motivating examples: > > type Bools > a::Bool > b::Bo

[julia-users] Preventing Bool<->Number conversion/promotion

2016-10-31 Thread Penn Taylor
Is there a way to prevent automatic conversion/promotion between Bool and Number types? Motivating examples: type Bools a::Bool b::Bool end Bools(1, 0) #=> Bools(true,false) type Ints a::Int64 b::Int64 end Ints(true, false) #=> Ints(1,0) In both of the above cases, I want the constru