argc arv is not the only pattern of arguments to a "main like" function, it's also possible to have an additional envp.
On windows it's better to use wchar_t instead of char in order to cause less issues; but it's also possible to use WinMain instead and this is preferred for native apps, and it doesn't have an argument list; if you are writing a service the required entry point is again something else different.

As far as the way I use them, entry points are platform/application specific, and there's no point in standardizing it.
You can very easily write a wrapper yourself that gives you this behavior if that's what you want.
I personally would never use it in this way anyway.

that's my 2c



From: Std-Proposals <std-proposals-bounces@lists.isocpp.org> on behalf of Jeremy Rifkin via Std-Proposals <std-proposals@lists.isocpp.org>
Sent: Saturday, September 7, 2024 5:37:22 PM
To: std-proposals@lists.isocpp.org <std-proposals@lists.isocpp.org>
Cc: Jeremy Rifkin <jeremy@rifkin.dev>
Subject: [std-proposals] Floating an idea: int main(std::span<std::string_view> args)
 
Hello,

I'd like to propose adding int main(std::span<std::string_view> args) as
a standard signature for main.

Motivation:
- Modernization
- Ergonomics
- Teachability
  - Modern C++ through and through instead of 'what's a char**' and
'argv[1] == "--help" is a footgun, beware'

Considerations:
- There would be slight startup overhead in constructing the
std::string_views and underlying array of string views, however, this
would be entirely opt-in
- It would probably add some implementation complexity
- This would be an aspect of the core language which depends on the
standard library. I don't love that, but, there is precedence for this
sort of thing
- Direct mutability of the argument contents would be lost

I would make a reference implementation as part of the proposal.


Cheers,
Jeremy
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals