|
|
|
|
|
by incepted
3742 days ago
|
|
We're specifically talking about operators and finding a way to determine if they are universally known. If the wording bothers you, replace it with "We should only accept symbolic operators that are taught up to sixth grade". |
|
& is maybe allowed. Sixth graders don't know about bitwise operations, but they know & means "and". That's stretching things a bit, though.
Is [] allowed for indexing? When I learned about arrays in sixth grade... No, wait, I didn't learn about arrays in sixth grade. For that matter, I didn't learn about functions using (): those are only for grouping expressions. Functions are just like, "sin 90". Also, since I didn't learn about code at sixth grade, I obviously didn't learn about using {} to delimit code blocks; , was only used in prose, not in mathematics.
Having said that, it's unclear why programming languages should be limited to operators that we can guarantee "sixth grade" students (whatever that happens to mean in your part of the world) will have heard of.
What actual benefit could it bring, other than (maybe) making it easier for somebody who hasn't learned a language to guess the meaning of a piece of code in that language? Is that benefit worth making code twice as long and rendering half the keyboard useless?
Should, I assume be: Anything else will be too confusing for the many sixth graders currently working professionally as programmers.