6 ms·
I understand trying to improve popular technologies that have issues, but for a text format with mass ubiquity, JSON has very little wrong with it to the point
by hresvelgr 1y ago
I understand trying to improve popular technologies that have issues, but for a text format with mass ubiquity, JSON has very little wrong with it to the point where I believe that projects like this are a profound waste of everyone's time.
I am all for people experimenting and making things they like, but a domain was purchased so I can only assume a serious intent to make something of this and my only reaction is that I hope this is not taken seriously and disappears.
- Cthulhu_ 1y agoPlus it hyperfocuses and compares to JSON, but there's many popular configuration languages that should be compared with as well like YAML, TOML, etc.
- dotancohen 1y agoThat's because MAML is a superset of JSON. It has some added features (comments, multiline strings, etc), but it will likely be confused for JSON upon first glance. MAML will also have to reference JSON implementations to resolve ambiguities, e.g. how to handle multiple identical array keys. So MAML can not live outside the JSON world.
- psychoslave 1y agoNo way to confuse with JSON, where you would instead expect // or /* */ for a comment facility which align with Javascript. Also """ for multiline string, I only encountered that in Python. But apparently Java, Kotlin and Swift also do that now. In js, backquote already do the trick. And the project is targeting more on configuration file, where TOML or YAML indeed are already competitors just as historically valid as JSON.
- Someone 1y ago> MAML will also have to reference JSON implementations to resolve ambiguities, e.g. how to handle multiple identical array keys Isn’t the spec (https://maml.dev/spec/v0.1 https://maml.dev/spec/v0.1), which says “Duplicate keys are not allowed within an object.” sufficient for that? Or am I misunderstanding what you mean by “array keys”? It seems the spec is silent on whether key order is significant in dictionaries, though.
- classified 1y ago> Ordered objects (keys have a defined order) https://github.com/maml-dev/maml/issues/1 https://github.com/maml-dev/maml/issues/1
- ithkuil 1y agoJSON with comments would go a long way
- krapp 1y agoUse Lua tables. Lua's parser is smaller than many JSON parsers, the syntax is almost the same and you can use comments.
- Bolwin 1y agoOn the web? In wasm? I'd much rather use a new format. MAML's parser is 2kb of js gzipped according to the repo and very fast.
- krapp 1y agoIf that matters, the just bite the bullet and use JSON, which is supported in every browser in existence and has a parser library in every language worth using.
- petersumskas 1y agoDouglas Crockford addressed this many years ago: write your human readable config with comments and run it through a pre-processor to strip them out before handing the config to a JSON parser. Seems like almost no one picked up on the idea.
- ulrikrasmussen 1y agoThat is such a horrible non-solution. It breaks all tooling which isn't aware of your particular preprocessor and adds a compilation step to every configuration.
- benhurmarcel 1y ago> write your human readable config with comments The question then becomes: what format is that?
- 1y ago
- ModernMech 1y ago> a domain was purchased so I can only assume a serious intent to make something of this Buying a domain is just part of the language craft, it doesn't mean this is a serious effort to supplant JSON. Mostly it just signals that the author is serious about keeping others away from the namespace, which maml is a really good one. There are thousands of language projects, most of them completely pointless, many of them have a domain, approximately 0 of them are "serious" in the way you're thinking. It's mostly just hobbyists, but people still try to make a name for their work and buying a domain name is a way to protect that investment.
- zzo38computer 1y ago> JSON has very little wrong with it JSON does have significant things wrong with it, both with the syntax and with the data types. For example, there is no proper integer type (this is the one problem that MAML corrects with the data), and it always uses Unicode (which MAML does not correct). However, different file formats can be helpful for different purposes.