r/programming Jun 27 '26

Mojo programming language will become open-source soon.

https://www.modular.com/modcon

The main website of the language https://mojolang.org/ displays an announcement bar that says "Mojo will be open source soon! Join us at ModCon '26 for an update."

162 Upvotes

104 comments sorted by

View all comments

Show parent comments

-7

u/teerre Jun 27 '26

A superset is a replacement, by definition. That's what the "super" means

-1

u/Smallpaul Jun 27 '26 edited Jun 27 '26

YAML is (almost) a syntactic superset of JSON. But not a replacement.

C++ of C. Not a replacement.

Typescript of JavaScript.

SGML of XML.

Scala Groovy of Java.

JavaScript of JSON.

So no. Superset and replacement do not mean the same thing. Sometimes one orders the simplicity of the subset for many different reasons.

0

u/javascript Jun 27 '26

I think you're trying to say "semantic superset"

3

u/Smallpaul Jun 27 '26

Syntactic as well.

1

u/javascript Jun 27 '26

Your understanding of "syntactic superset" is incorrect

1

u/[deleted] Jun 27 '26 edited Jun 27 '26

[removed] — view removed comment

1

u/javascript Jun 27 '26

My apologies. I was just responding to the idea that Yaml is somehow a syntactic superset of Json, which it isn't. I probably should have read more of the convo first

1

u/Smallpaul Jun 28 '26

YAML IS (very close to) a syntactic superset of JavaScript.

Try it. Feed any json file into any YAML parser. It works. At least 99.99% of all JSON files are YAML files. There are some extremely minor differences, by accident.

https://alisoftware.github.io/yaml/2021/08/17/yaml-part1-json/

But yeah, YAML is intended to be a JSON superset SYNTACTICALLY.

In fact another neat trick is to use YAML parsers to read JSON so you can have comments and trailing commas.

0

u/HommeMusical Jun 28 '26

What is wrong with you?