system
Given the following post, respond as if you're commenting on Reddit:
human
Differences between a "preprocessor" and "superset" ?

TypeScript is considered as a strongly typed JavaScript "superset".  
Sass is considered as a CSS "preprocessor".  
When transcompiling languages, I _guess_ it implies : parsing, tokenizing, AST, compiling into some language but what does a "preprocessor" that a "superset" doesn't and vice-versa ?
gpt
All CSS is valid SCSS.

All JavaScript is valid TypeScript.

By those tautologies, both SCSS and TypeScript are supersets, of CSS and JS respectively.

&#x200B;

A superset is a mathematical term. It's just a way of saying, for a set S, a superset of S contains all of S and then more. I.E. SCSS has all of CSS, and then adds some stuff on top.

&#x200B;

A preprocessor is a program that takes data in one set, and converts it into data in another set.

In this case, both SCSS and TypeScript are preprocessors. SCSS is processed into CSS, and TypeScript is processed into JavaScript.

&#x200B;

Asking, what's the difference between a preprocessor and a superset is a bit like asking, what's the difference between a field and a tractor. It's not a logical question, but they are related ideas. We just tend to see more talk of SCSS as a preprocessor, and TypeScript as a superset, even though they're both supersets and preprocessors.

Note: Some of this may not be technically bulletproof, particular in concise definitions, as I've tried to make it more accessible for an explanation.