Re:The software that flies SpaceX rockets and starships
by jcelerier on Wednesday December 29, 2021 @02:57PM
(#29729250)
Most of the standard is taken by the description of the standard library ; the language specs ends at page 457 in C++20 (last draft).
How long would be your language spec if every single function's documentation was part of it ?
To give a reference with other languages:
- This is a bit less than C# (whose standard language spec ends at page 462 in ECMA-364 2nd ed.).
- The python spec for 3.9.9 is 151 pages. Okay, but let's compare equivalent things in the C++ spec and Python spec: awaiting a coroutine.
* In Python (the whole "await" spec):
Suspend the execution of coroutine on an awaitable object. Can only be used inside a coroutine function.
await_expr ::= "await" primary
New in version 3.5.
* In C++ (5% of the "co_await" spec): The co_await expression is used to suspend evaluation of a coroutine (9.5.4) while awaiting completion of the computation represented by the operand expression.
await-expression :
co_await cast-expression
But, for C++ this is only the first sentence (which is not written in an abbreviated style but as a proper sentence). Then a whole page explains the semantics in detail, and gives a complete example of how to use it. The python spec is just insufficient in comparison.
Re:The software that flies SpaceX rockets and starships
by ironmagma on Wednesday December 29, 2021 @03:03PM
(#29729309)
I'm sure it would be long. The point was more that pretty much every (productive) development environment is complex.
Re:The software that flies SpaceX rockets and starships
by yellow_lead on Wednesday December 29, 2021 @02:07PM
(#29728630)
I'm sure they're using a strict subset of C++ but it is still complex. I wonder if they'll move to Rust some day.
[1] https://www.iso.org/standard/79358.html