|
@@ -298,7 +298,7 @@ There is no easy place to put the increment in a `while` loop.
|
|
|
Advantages:
|
|
Advantages:
|
|
|
|
|
|
|
|
- We need a plan for
|
|
- We need a plan for
|
|
|
- [migrating both developers and code from C++](https://github.com/carbon-language/carbon-lang/blob/trunk/docs/project/goals.md#interoperability-with-and-migration-from-existing-c-code)
|
|
|
|
|
|
|
+ [migrating both developers and code from C++](/docs/project/goals.md#interoperability-with-and-migration-from-existing-c-code)
|
|
|
semisemis `for` loops, and providing them in Carbon is the easiest solution.
|
|
semisemis `for` loops, and providing them in Carbon is the easiest solution.
|
|
|
- Semisemis remain common in C++ code.
|
|
- Semisemis remain common in C++ code.
|
|
|
- Semisemis are much more flexible than range-based `for` loops.
|
|
- Semisemis are much more flexible than range-based `for` loops.
|
|
@@ -310,7 +310,7 @@ Disadvantages:
|
|
|
- Syntax such as `for (int x : range(0, 3))` leaves less room for
|
|
- Syntax such as `for (int x : range(0, 3))` leaves less room for
|
|
|
developer mistakes.
|
|
developer mistakes.
|
|
|
- Removing semisemi syntax will likely improve
|
|
- Removing semisemi syntax will likely improve
|
|
|
- [understandability of Carbon code](https://github.com/carbon-language/carbon-lang/blob/trunk/docs/project/goals.md#code-that-is-easy-to-read-understand-and-write),
|
|
|
|
|
|
|
+ [understandability of Carbon code](/docs/project/goals.md#code-that-is-easy-to-read-understand-and-write),
|
|
|
a language goal.
|
|
a language goal.
|
|
|
- If we add semisemi loops, it would be very difficult to get rid of them.
|
|
- If we add semisemi loops, it would be very difficult to get rid of them.
|
|
|
- Code using them should be expected to accumulate quickly, from both
|
|
- Code using them should be expected to accumulate quickly, from both
|