News for hackers. Stuff that matters.
Re:The Great Software Stagnation by asdff on Monday January 04, 2021 @12:21AM (#25628138)
I get that programming languages are designed by committee and every decision is thought out, but that still makes some things arbitrary to whatever they decided. It really is arbitrary that a for loops is done like this in python:

for val in sequence:

  print(val)
and this in R:

for (val in sequence)

{

print(val)

}

and this in bash: for val in sequence; do echo val; done

I mean there was no paper that I can find that found curly braces to be especially drawing to the human eye or anything like that. or that it's particularly intuitive to write "do" and "done" or not. For loops look like no linguistical sentence structure that I recognize, they are pretty much their own thing structurally imo. These are all arbitrary decisions decided by people, because it just happened to make arbitrary sense at the time for any number of reasons. Not because the R core team ran some psychological experiments to empirically determine the most intuitive for loop structure when they drafted their language; that data has never been collected, the R core team just followed what the S team had already done and that's that. Arbitrary.

There are no comments on this comment yet.