Comment by hresvelgr

Comment by hresvelgr 9 hours ago

14 replies

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_ 7 hours ago

Plus 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 7 hours ago

    That'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.

    • Someone 6 hours 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), 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.

    • psychoslave 7 hours ago

      No 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.

ithkuil 6 hours ago

JSON with comments would go a long way

  • petersumskas 5 hours ago

    Douglas 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 4 hours ago

      That 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 4 hours ago

      > write your human readable config with comments

      The question then becomes: what format is that?

    • seanhunter an hour ago

      > Seems like almost no one picked up on the idea.

      Seems to me more like almost no one thought the idea was any good.

  • sebazzz 44 minutes ago

    JSON5 is what that is called and it already has wide support.

  • krapp 6 hours ago

    Use Lua tables. Lua's parser is smaller than many JSON parsers, the syntax is almost the same and you can use comments.

    • Bolwin an hour ago

      On 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.

ModernMech 2 hours 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.