What are some programming languages that reuse most of the syntax of another (rather than just a few elements of it?)
I just wanted to mention the esoteric programming language INTERCAL, which was created with the idea to be unlike every other programming language as much as possible.
For example: The creators wanted to include GOTO because of how maligned it is with programmers, but since GOTO exists in many languages already they instead created the COME FROM statement which also makes the arbitrary jumps in execution even more confounding when trying to read the code.
@ryujin470@fedia.io Most good languages are a variation of ALGOL, Psacal, or LISP. They have added a lot more syntax, but there are only so many ways to represent blocks (both named and unnamed, calling functions, loops and the other basics within the limits of 7 bit ASCII. Even if you expand any language (including symbols you makeup), those still remains the basics and we have learned from painful experience what makes things bad.
I’m not sure, I understand the question, because there’s tons of languages that are basically just a superset of another, such as C++ for C, TypeScript for JavaScript, Crystal for Ruby. Heck, the whole family of LISP languages kind of matches your question, because they all use most of the syntax of LISP.
Objective–C is a strict superset of C. Anything that’s valid C can be used in an Objective–C file.
Interesting question because I think there are entire families of programming languages that share mostly the same syntax. Often, a popular language of its time like C, Java, Python or Lua inspires a range of languages with a similar syntax, but different semantics.
Like how JavaScript was supposed to look like Java, but to be adopted to a browser environment.Edit: C# may be a more accurate example, or how Godot Script and Bend look like Python.I’d say the language family that has the most uniform syntax is shell scripting languages. They have mostly been standardized by POSIX and features are often being copied to make the shell more familiar and interoperable.
@bricked@feddit.org javascript wasn’t written to be like java. Java was the big thing so some marketer found a way to attach java to the name
@ryujin470@fedia.io
You’re right, it was a vad example. I added some other examples that might be more accurate, allthough less popular.
Maybe D? It’s not a superset of C, but there is substantial shared syntax.
Python and GDScript are pretty similar syntactically, but the latter is more game focused and doesn’t have things like decorators, list comprehensions, or context managers
Groovy and Kotlin borrowing heavily from Java. Groovy and Kotlin are also very similar to each other.