Date: Sat, 18 Apr 2026 20:17:36 +0500
No, a product type in computer science as described by
https://en.wikipedia.org/wiki/Algebraic_data_type is a "A product type
combines types together. A value of a product type will contain a value for
each of its component types. For example, a Point type might be defined to
contain an x coordinate (an integer) and a y coordinate (also an integer).
Formal examples of product types include tuples and records. "
Which means it can't have additional infrosmtion other than the objects of
types that it holds.
Integers are primitive types.
On Sat, 18 Apr 2026, 7:49 pm Sebastian Wittmeier via Std-Proposals, <
std-proposals_at_[hidden]> wrote:
> The term product type comes from the number of states:
>
>
>
> A single uint8_t has 256 possible states.
>
> A union of uint8_t and uint16_t has 256+65536 states.
>
> A struct of uint8_t and uint16_t has 256*65536 states.
>
>
>
> That means a union is either or and stores nothing of the uint16_t even if
> the uint8_t only overwrites one byte.
>
> A struct has to store all possible uint8_t and uint16_t in combination.
>
>
>
> A heterogeneous list (with predefined types) of course is a product type.
>
>
> -----Ursprüngliche Nachricht-----
> *Von:* Muneem via Std-Proposals <std-proposals_at_[hidden]>
> *Gesendet:* Sa 18.04.2026 16:43
> *Betreff:* Re: [std-proposals] Extension to std::tuples to allow runtime
> indexing.
> *An:* std-proposals_at_[hidden];
> *CC:* Muneem <itfllow123_at_[hidden]>;
> I use terms from wilkipedia since I don't want to be wrong or arrogant
> enough to think I am always right, but since you are asking me about it:
> A tuple is a product type, which means it's a type that has lists of
> objects that can be of any type and nothing else. That's the defintion.
> Tuples and structs were built to fit just that. Where as my type is meant
> to not fit that, which means that it can have additional book keeping
> information.
>
> Sorry for the confusion. I am 17 and new to all this, so I am trying to
> cite other sources just to stay correct.
>
> On Sat, 18 Apr 2026, 7:32 pm Giuseppe D'Angelo via Std-Proposals, <
> std-proposals_at_[hidden]> wrote:
>
> On 18/04/2026 16:24, Muneem via Std-Proposals wrote:
> > What I meant, by "tuples have overhead" is that they have a fixed ABI
> > for all their specaizations, which means that any book keeping has to be
> > on the top of the tuple and can't be inside it.
>
> What does "on top of" or "inside it" mean?
> Can you show some code? Or even some pseudocode?
>
>
> > Since runtime indexed
> > tuples are a completely different notion than compile indexed tuple
> > since one is a product type like a struct. Runtime indexed tuples is
> > heterogeneous list.
>
> Again, I don't understand what any of this means.
>
> Please don't use "overloaded" words. People come from all sorts of
> backgrounds and using these words just causes confusion. Instead please
> provide the definitions yourself, and add lots of examples to make sure
> there's no misunderstandings.
>
> For instance, what you consider a "heterogeneous list" may not be what
> other people consider as such. One may understand that as a
> std::vector<std::any>.
>
>
> My 2 c,
>
> --
> Giuseppe D'Angelo
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
https://en.wikipedia.org/wiki/Algebraic_data_type is a "A product type
combines types together. A value of a product type will contain a value for
each of its component types. For example, a Point type might be defined to
contain an x coordinate (an integer) and a y coordinate (also an integer).
Formal examples of product types include tuples and records. "
Which means it can't have additional infrosmtion other than the objects of
types that it holds.
Integers are primitive types.
On Sat, 18 Apr 2026, 7:49 pm Sebastian Wittmeier via Std-Proposals, <
std-proposals_at_[hidden]> wrote:
> The term product type comes from the number of states:
>
>
>
> A single uint8_t has 256 possible states.
>
> A union of uint8_t and uint16_t has 256+65536 states.
>
> A struct of uint8_t and uint16_t has 256*65536 states.
>
>
>
> That means a union is either or and stores nothing of the uint16_t even if
> the uint8_t only overwrites one byte.
>
> A struct has to store all possible uint8_t and uint16_t in combination.
>
>
>
> A heterogeneous list (with predefined types) of course is a product type.
>
>
> -----Ursprüngliche Nachricht-----
> *Von:* Muneem via Std-Proposals <std-proposals_at_[hidden]>
> *Gesendet:* Sa 18.04.2026 16:43
> *Betreff:* Re: [std-proposals] Extension to std::tuples to allow runtime
> indexing.
> *An:* std-proposals_at_[hidden];
> *CC:* Muneem <itfllow123_at_[hidden]>;
> I use terms from wilkipedia since I don't want to be wrong or arrogant
> enough to think I am always right, but since you are asking me about it:
> A tuple is a product type, which means it's a type that has lists of
> objects that can be of any type and nothing else. That's the defintion.
> Tuples and structs were built to fit just that. Where as my type is meant
> to not fit that, which means that it can have additional book keeping
> information.
>
> Sorry for the confusion. I am 17 and new to all this, so I am trying to
> cite other sources just to stay correct.
>
> On Sat, 18 Apr 2026, 7:32 pm Giuseppe D'Angelo via Std-Proposals, <
> std-proposals_at_[hidden]> wrote:
>
> On 18/04/2026 16:24, Muneem via Std-Proposals wrote:
> > What I meant, by "tuples have overhead" is that they have a fixed ABI
> > for all their specaizations, which means that any book keeping has to be
> > on the top of the tuple and can't be inside it.
>
> What does "on top of" or "inside it" mean?
> Can you show some code? Or even some pseudocode?
>
>
> > Since runtime indexed
> > tuples are a completely different notion than compile indexed tuple
> > since one is a product type like a struct. Runtime indexed tuples is
> > heterogeneous list.
>
> Again, I don't understand what any of this means.
>
> Please don't use "overloaded" words. People come from all sorts of
> backgrounds and using these words just causes confusion. Instead please
> provide the definitions yourself, and add lots of examples to make sure
> there's no misunderstandings.
>
> For instance, what you consider a "heterogeneous list" may not be what
> other people consider as such. One may understand that as a
> std::vector<std::any>.
>
>
> My 2 c,
>
> --
> Giuseppe D'Angelo
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
Received on 2026-04-18 15:17:57
