📝Languages might be the same structurally

tags
#insight § Programming Language

If you take out the syntax and look at programming languages constructs, there might be many languages that are virtually the same.

There are actually 2 things left, after converting the code into AST:

  1. AST and its supported constructs
  2. libraries (especially, standard one)

I think that (1) many AST structures can be cross-converted between languages, (2) completely different AST structures can be stacked up into a single structure (I think very similar to the way Jetbrains MPS combines languages).

This leaves the standard library the very integral part of the language.

Though, there are fundamental differences between some languages like: memory management, type systems. (Runtime is what makes languages unique)

As an example, Svelte uses javascript syntax but assigns different semantics to some constructs. Is it still javascript?

See also:

Inspired by Elements compiler that mixes multiple languages by parsing them into a single AST.

Backlinks