Based on my limited knowledge, the purpose of Abstract Syntax Notation One (ASN.1) seems similar (and/or overlaps with) to Annotated Terms (ATerms). ASN.1 has been around longer, is more widespread (e.g., X-509 certificates are defined using it), and have more mature tooling, and ATerms seems to be abandoned (or at least couldn’t find any active projects other than Nix that use it).
Found an issue suggesting to change the ATerms representation of store derivations, but there is no mention as to why ATerms is inadequate. Sure, it’s use in Nix is not documented (apart from Dolstra’s PhD thesis), but other than that, it has been working out for decades and I’m not aware of technical issues with it (such as hindering the addition of features, making processing slow / more expensive, etc.).
This question was borne out of pure historical curiosity (and because I found out that both ATerms and ASN.1 can be useful with ontologies).
edit: Of course, I just found one possible reason, right after submitting this post, but it does not mention ASN.1:
The .drv files are written in an obscure academic language called “aterm”. It was selected by Eelco because it makes some guarantees in terms of reproducible output like ordering the keys alphabetically.
Nowadays most references to it have disappeared in the nix code. The upstream library has been merged into the nix code base and upstream has disappeared.
- [BJKO00] M.G.J. van den Brand, H.A. de Jong, P. Klint, and P. Olivier. Efficient Annotated Terms . 259–291. Software, Practice & Experience . 30. 2000.
- Chapter 1. The ATerm Programming Guide
- (Probably more related stuff in this directory.)