> For example, over time we've wound up agreeing on various common control structures like for and while loops, if statements, and multi-option switch/case/etc statements. The syntax may vary (sometimes very much, as for example in Lisp), but the approach is more or less the same because we've come up with good approaches.
I am not sure about that. As an example, look at for loops.
Swift dropped C-style for loops only 10 years ago (10 years isn’t long in language design time) (https://github.com/swiftlang/swift-evolution/blob/main/propo...), and there still is the difference between pascal for loops, where the number of iterations can be computed when the loop is first entered and the more flexible C-style ones that are while loops in disguise.
As a fourth option, there are the functional ones that replace
for i in items…
by
items.foreach…
(I do not think that falls under “The syntax may vary”)
> For example, over time we've wound up agreeing on various common control structures like for and while loops, if statements, and multi-option switch/case/etc statements. The syntax may vary (sometimes very much, as for example in Lisp), but the approach is more or less the same because we've come up with good approaches.
I am not sure about that. As an example, look at for loops.
Swift dropped C-style for loops only 10 years ago (10 years isn’t long in language design time) (https://github.com/swiftlang/swift-evolution/blob/main/propo...), and there still is the difference between pascal for loops, where the number of iterations can be computed when the loop is first entered and the more flexible C-style ones that are while loops in disguise.
As a fourth option, there are the functional ones that replace
by (I do not think that falls under “The syntax may vary”)