Date: Wed, 23 Jul 2025 18:05:04 +0200
To begin with, one would not be required to use the types. Maximum POSIX command line length is 2048, though some OSs may have a higher limit. One could admit string_view as well. I think of starting new processes with execve, which provides variables. For what purpose are the arguments and environment modified?
> On 23 Jul 2025, at 15:38, Sebastian Wittmeier via Std-Proposals <std-proposals_at_[hidden]> wrote:
>
> AW: [std-proposals] D3803R0 More standard forms of main body { font-family: Arial, Verdana, Sans-Serif ! important; font-size: 12px; padding: 5px 5px 5px 5px; margin: 0px; border-style: none; background-color: #ffffff; } p, ul, li { margin-top: 0px; margin-bottom: 0px; } We went through using C++ types in the recent past on this mailing list.
>
> Points for discussion were:
> - Possibly high overhead for long command lines - either time or space overhead.
> - IIRC some platforms allow to modify the parameters or environment variables, which is actively used by some frameworks. Would this be supported by the C++ types?
>
> -----Ursprüngliche Nachricht-----
> Von: Hans Åberg via Std-Proposals <std-proposals_at_[hidden]>
> Gesendet: Mi 23.07.2025 14:49
> Betreff: Re: [std-proposals] D3803R0 More standard forms of main
> An: std-proposals_at_[hidden];
> CC: Hans Åberg <haberg_1_at_[hidden]>;
> The prototype should probably be
> int main(const std::vector<std::string>& arg, const std::map<std::string, std::string>& env);
> so that one gets the environmental variables sorted (ordering is not specified on POSIX). (There is a lot of overhead with std::unordered_map for small tables.)
>
> I also see the primary reason for including it is that one can program with C++ types, which are more secure. And one does not need to worry about what exactly the OS is doing.
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
> On 23 Jul 2025, at 15:38, Sebastian Wittmeier via Std-Proposals <std-proposals_at_[hidden]> wrote:
>
> AW: [std-proposals] D3803R0 More standard forms of main body { font-family: Arial, Verdana, Sans-Serif ! important; font-size: 12px; padding: 5px 5px 5px 5px; margin: 0px; border-style: none; background-color: #ffffff; } p, ul, li { margin-top: 0px; margin-bottom: 0px; } We went through using C++ types in the recent past on this mailing list.
>
> Points for discussion were:
> - Possibly high overhead for long command lines - either time or space overhead.
> - IIRC some platforms allow to modify the parameters or environment variables, which is actively used by some frameworks. Would this be supported by the C++ types?
>
> -----Ursprüngliche Nachricht-----
> Von: Hans Åberg via Std-Proposals <std-proposals_at_[hidden]>
> Gesendet: Mi 23.07.2025 14:49
> Betreff: Re: [std-proposals] D3803R0 More standard forms of main
> An: std-proposals_at_[hidden];
> CC: Hans Åberg <haberg_1_at_[hidden]>;
> The prototype should probably be
> int main(const std::vector<std::string>& arg, const std::map<std::string, std::string>& env);
> so that one gets the environmental variables sorted (ordering is not specified on POSIX). (There is a lot of overhead with std::unordered_map for small tables.)
>
> I also see the primary reason for including it is that one can program with C++ types, which are more secure. And one does not need to worry about what exactly the OS is doing.
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2025-07-23 16:06:22