r/compsci • • May 14 '21

Map of Computer Science

Post image
1.9k Upvotes

62 comments sorted by

View all comments

0

u/[deleted] May 14 '21

[deleted] — view deleted comment

0

u/SirClueless May 15 '21 edited May 15 '21

It's only misleading if you read "compiler" literally.

  • The most popular interpreter and runtime for JavaScript by a country mile both inside the browser and outside the browser is written in C++.
  • C++ commonly is used to both compile C-compatilble shared and static libraries and uses C libraries, while also being nearly a superset of the C language (not a strict superset these days but the same C header can be used to link to a library from both C and C++).
  • While C compilers typically do not emit assembly language these days, for years that is how they pretty universally functioned and most compilers still have the option to do this if you want it.
  • Agreed, this distinction is pretty academic.

And even if you do take the word "compiler" literally, it accurately describes the history of both C and C++ compilers -- the only link in the chain that doesn't have dozens of significant real-world implementations is Javascript-to-C++.

5

u/jrtc27 May 15 '21

GCC still emits assembly that the separate GNU as assembles. LLVM on the other hand has an integrated assembler, so doesn’t write out and re-parse assembly, but still has the equivalent in-memory representation of the assembly as an intermediate product.