exercism / csharp

Exercism exercises in C#.
https://exercism.org/tracks/csharp
MIT License
343 stars 345 forks source link

introduce compound assignments for mathematical operators #1458

Open ErikSchierboom opened 4 years ago

ErikSchierboom commented 4 years ago

The flag-enums exercise introduces the concepts of compound assignments and has the following in its after.md file:

The bitwise operators can also be used as [compound assignments][compound-assignment], which are a shorthand notation where x = op y can be written as x op= y:

We should introduce compound assignment in the numbers exercise's after.md document instead (the above text can remain in the flag-enums after.md file). In the after.md document of the numbers exercise, we should introduce compound assignments and use the ones with mathematical operators like +=, -=, etc as examples.

Furthermore, the compound-assignment concept in the languages/csharp/config.json file should be moved from the flag-enums exercise to the numbers exercise.

edit: updated

mikedamay commented 4 years ago

I think flag-enums is a bit too niche to use for compound operators.

What about numbers? arrays is a bit crowded and we don't want too much in basics.

Alternatively, I don't see numeric literals covered anywhere (incl. hex format). Perhaps we have enough for an arithmetic exercise.

ErikSchierboom commented 4 years ago

I like numbers best too! I've updated the issue.