Hi Eric,

Yes that's what I've currently done for a package I'm developing, I was 
just wondering if this was ever considered as being the default setting, 
and if the creators decided not to do it because it doesn't play nice with 
some other aspect of Julia.

On Tuesday, April 12, 2016 at 7:30:23 PM UTC-7, Eric Forgy wrote:
>
> Hi Anonymous,
>
> One of the nice things about Julia is that if you want that feature in 
> your code, you just need to do this:
>
> import Base: min, max
>
> min() = Inf
> max() = -Inf
>
> Voila. It will be a good/fast as if it was in Base (because it is now - 
> for you and anyone using your package) :)
>
> I hope this helps.
>
> Best regards,
> Eric
>
> On Wednesday, April 13, 2016 at 10:22:10 AM UTC+8, Anonymous wrote:
>>
>> Have the Julia developers considered the effects of setting 
>> Base.min()=Inf and Base.max()=-Inf.  This is common in real analysis since 
>> it plays nice with set theory, i.e.
>>
>> A ⊆ B  =>  max(A) ≤ max(B)
>>
>> A ⊆ B  =>  min(A) ≥ min(B)
>>
>> Thus since the empty set ø is a subset of every set, the max of it 
>> should be smaller than the maximum of any nonempty set, and the min of it 
>> should be larger than the minimum of any nonempty set.
>>
>

Reply via email to