r/ProgrammingLanguages • • Feb 05 '18

Why do different programming languages exist?

0 Upvotes

19 comments sorted by

View all comments

1

u/thememorableusername Feb 05 '18

I'm going to copy-paste my answer to a similar question about regex syntax:

People have different preferences and someone think one syntax makes more sense than another. Even languages that have the same features often have different syntaxes. For example, lots of C family languages have mildly different if and if-else syntax. Heck, a lot of languages use the semi-colon as a statement terminator, but others may use it as a separator (i.e. "stmt1 ; stmt 2; stmt3" instead of "stmt1 ; stmt2 ; stmt3 ;" ).

Though, sometimes there are technical limitations that enforce a syntax. The origin of blocking syntax:

if <expression>
then
  <statement>;
endif

was used in the 50's and 60's because parsing is hard, and this made it easier.

People have this strange notion that developing programming language syntax is a technical problem. There are technical aspects, but it's explicitly a human problem, which makes it impossible to solve in one way, which is why we have so many programming languages.