| ||Ask HN: File format for declarative language?|
5 points by mchahn on Feb 23, 2016 | hide | past | web | favorite | 6 comments |
|I'm in the process of developing a pure declarative language. The source consists of simple JS-like data structures that would be at home in a JSON file. I have two questions ...|
- I'm naturally considering using JSON, but I don't think it is great for writing original code. It has too much visual clutter like quotes. My next thought was YAML but it seems kind of obtuse and overly-complex. Any thoughts on this would be appreciated. Am I overlooking any?
- Assuming I have a format chosen, can I use a new custom file suffix matching my language or must it be `.yml`, `.json`, etc.? One could argue that the suffix should match the syntax (`.json`) or one could argue it should match the semantics (my language). There are languages than match C syntax but don't have the `.C` suffix (if I'm not mistaken).
| Apply to YC