# Type vs tuple that contains a type, Type vs DataType

**URL:** <https://discourse.julialang.org/t/type-vs-tuple-that-contains-a-type-type-vs-datatype/109850>\
**Category:** General Usage\
**Tags:** question, type\
**Created:** [February 7, 2024, 2:37am UTC](https://discourse.julialang.org/t/type-vs-tuple-that-contains-a-type-type-vs-datatype/109850 "2024-02-07T02:37:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [February 7, 2024, 2:37am UTC](https://discourse.julialang.org/t/type-vs-tuple-that-contains-a-type-type-vs-datatype/109850/1 "2024-02-07T02:37:48Z")

</div>

Is there a rationale for the failure here:

```julia-repl
julia> Val(Int)
Val{Int64}()

julia> Val((Int,))
ERROR: TypeError: in Type, in parameter, expected Type, got a value of type Tuple{DataType}
Stacktrace:
 [1] Val(x::Tuple{DataType})
   @ Base ./essentials.jl:1002
 [2] top-level scope
   @ REPL[2]:1

```

FTR I think a workaround is to wrap with some parametric type, e.g., with `Tuple`. So, to give a specific example, `Val(Tuple{Int,String})` works, but `Val((Int, String))` doesn’t.

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [February 7, 2024, 3:11am UTC](https://discourse.julialang.org/t/type-vs-tuple-that-contains-a-type-type-vs-datatype/109850/2 "2024-02-07T03:11:52Z")

</div>

Here’s a first-order rationale: Val puts its argument into a type parameter. Type parameters must be `isbits` or types themselves. Tuples of types aren’t `isbits` nor are they `isa Type`.

I’m sure you could go _ **much** _ deeper down this rabbit hole. Somewhere down there you’ll find Julia#10380.
