Re:The first new build of Circle, a new C++20 compiler, sinc...
by FpUser on Monday January 23, 2023 @09:39PM
(#34498428)
>"That alone is, to me, sufficient reason to believe that changing it to Pascal-style "name: type" declarations, which are unambiguous, benefits both tools and humans, even if it's slightly more verbose."
I am not against it. It is a different language altogether though. We were talking about "fixing" C++ while it is still being C++.
Re:The first new build of Circle, a new C++20 compiler, sinc...
by int_19h on Tuesday January 24, 2023 @05:49AM
(#34502034)
As it happens, C++ has already adopted "auto f() -> T" function declaration syntax many years ago in addition to "T f()", so this is arguably just a more streamlined take on that. I don't see how it makes it less C++, since conceptually everything is the same.
And the declaration syntax for C++ is so bad that, in the most general case, you can't even reliably tell if it's a declaration or not without knowing the compiler that'll process it! Consider:
The first commented line above parses either as: or as: depending on whether sizeof(int)==sizeof(void*) on that particular implementation. Consequently, the following &d is either legal or not, depending on whether it's trying to take the address of a local or of an enum constant.That alone is, to me, sufficient reason to believe that changing it to Pascal-style "name: type" declarations, which are unambiguous, benefits both tools and humans, even if it's slightly more verbose.