Date: Fri, 25 Apr 2025 00:38:46 +0200
On 25/04/2025 00.24, Paul Robert Stackhouse via Std-Proposals wrote:
> Hello,
>
> I’m an up-and-coming programmer, who is making making their way through college. I am just about to complete an intro to C++ course. I have a few additions that I would like to propose. If needed, I can supply the code that I’ve worked on to make them a reality for myself.
>
> For some context, I know classes, templates, vectors, linked lists, recursion, etc. I know how to construct a variable from a class object and make it return different values by default, without using any class functions. I know about preprocessor directives, and I’ve seen some of the files for things like the iostream file, so I know how to use the yvals_core.h file to make a custom std-namespace-based file. That should provide you enough information to be able to see the capabilities of what I’ve made.
What is the vvals_core.h file? I've never heard of it.
> As for what I’m recommending, it is a two-fold recommendation on making a universal variable type. The first is a universal value type. This can store any value inside itself and return any value stored in it to another variable. It is a universal value, since while it can store any individual value, it cannot store any structure of values. The other - and you’ll see how they are connected - is to make a universal storage type, that can store anything of any value inside itself. It would have to be able to store lists and vectors as well as maps, and it would have to be able to use only one set of storage for them. Additionally, as it would be a universal storage type, it would have to be able to store any individual values, like the universal value type. This would allow C++ to process complex and complicated documents with ease.
Do you envision that the two types you're talking about are built-in types,
or standard library types? Have you looked at std::any? Have you looked at
any of the various JSON libraries out there? Have you looked at std::variant?
What's missing from each of those types, making you ask for yet another such
type?
"That should provide you enough information..."
Actually, there is very little information in the above write-up.
Can you show some sample code that you think should work with your
proposal?
Thanks,
Jens
> Hello,
>
> I’m an up-and-coming programmer, who is making making their way through college. I am just about to complete an intro to C++ course. I have a few additions that I would like to propose. If needed, I can supply the code that I’ve worked on to make them a reality for myself.
>
> For some context, I know classes, templates, vectors, linked lists, recursion, etc. I know how to construct a variable from a class object and make it return different values by default, without using any class functions. I know about preprocessor directives, and I’ve seen some of the files for things like the iostream file, so I know how to use the yvals_core.h file to make a custom std-namespace-based file. That should provide you enough information to be able to see the capabilities of what I’ve made.
What is the vvals_core.h file? I've never heard of it.
> As for what I’m recommending, it is a two-fold recommendation on making a universal variable type. The first is a universal value type. This can store any value inside itself and return any value stored in it to another variable. It is a universal value, since while it can store any individual value, it cannot store any structure of values. The other - and you’ll see how they are connected - is to make a universal storage type, that can store anything of any value inside itself. It would have to be able to store lists and vectors as well as maps, and it would have to be able to use only one set of storage for them. Additionally, as it would be a universal storage type, it would have to be able to store any individual values, like the universal value type. This would allow C++ to process complex and complicated documents with ease.
Do you envision that the two types you're talking about are built-in types,
or standard library types? Have you looked at std::any? Have you looked at
any of the various JSON libraries out there? Have you looked at std::variant?
What's missing from each of those types, making you ask for yet another such
type?
"That should provide you enough information..."
Actually, there is very little information in the above write-up.
Can you show some sample code that you think should work with your
proposal?
Thanks,
Jens
Received on 2025-04-24 22:38:50