I think Scott meant a type union:
julia> Union{Int,Float64}
Union{Float64,Int64}
julia> Int<:ans
true
which is itself a type.
On Tue, 2015-12-29 at 00:53, Ismael VC <[email protected]> wrote:
> I thougt one advantage of using sets would be the ability to use set
> operations, but they work on arrays to, by the way the documentation of ie,
> union falls short, because it’s actually more general than what it says (*not
> only sets*):
>
> help?> union
> search: union union! Union @unix_only function Function functionloc
> functionlocs
>
> union(s1,s2...)
> ∪(s1,s2...)
>
> Construct the union of two or more sets. Maintains order with arrays.
>
> julia> union([1, 1], [2]) # this also works!
> 2-element Array{Int64,1}:
> 1
> 2
>
>
>
> Ismael Venegas Castelló
>
> *Data Analyst*
>
> Cel. 044 55 6434 0229
>
> [email protected]
>
> Cerro San Francisco 357, C.P. 04200
>
> Campestre Churubusco, Coyoacán
>
> Ciudad de México
> <http://t.sidekickopen35.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XX43Mx_82W1p1tN-8q-fZWW3LPXXH56dKBHf5NSPJF02?t=https%3A%2F%2Frichit.com.mx%2F&si=4656540167962624&pi=490f30db-2991-43c1-8848-db887e2fde0c>
>
> <https://www.facebook.com/richitsolution>
> <http://t.sidekickopen35.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XX43Mx_82W1p1tN-8q-fZWW3LPXXH56dKBHf5NSPJF02?t=https%3A%2F%2Ftwitter.com%2Frichitsolution&si=4656540167962624&pi=490f30db-2991-43c1-8848-db887e2fde0c>
> <[email protected]>
>
> Tel. 6718 1818
> richit.com.mx
>
> 2015-12-28 12:44 GMT-06:00 Scott Jones <[email protected]>:
>
>> How would this fit in with Jeff's work on types/subtypes?
>> At JuliaCon he did talk about improving the type system (something I've
>> been really hoping to see).
>> It seems to me that it might be more logically consistent to return a type
>> union for this, but I understand that currently it is easier to work with
>> returning a simple sorted vector.
>>
>> Scott
>>
>> On Sunday, December 27, 2015 at 12:10:38 AM UTC-5, Kevin Squire wrote:
>>>
>>>
>>>
>>> On Saturday, December 26, 2015, Ray Toal <[email protected]> wrote:
>>>
>>>> I noticed that
>>>>
>>>> *julia> **subtypes(Type)*
>>>>
>>>> *3-element Array{Any,1}:*
>>>>
>>>> * DataType *
>>>>
>>>> * TypeConstructor*
>>>>
>>>> * Union *
>>>>
>>>> and was wondering if there was any significance in the order of the
>>>> subtypes. If not, could the method have produced a Set instead?
>>>>
>>>>
>>> It could, but why? A set has a bit more overhead than an array, and for
>>> most types, the number of subtypes is small enough that sets wouldn't
>>> really offer any advantage.
>>>
>>> Is there something you want to do with the results that you think
>>> requires a set?
>>>
>>> Cheers,
>>> Kevin
>>>
>>