S expressions filename extension?

I can’t seem to find a standard filename extension for s expressions?

Is there one (similar to .json, .toml and .yaml)?

maybe .sexp ?

If you call your file .sexp it’ll likely be blocked by some network filtering tools at some high-schools and universities; also possibly some companies. (E.g., links such as http://github.com/whatever/some-project/conf.sexp will not pass URL filtering.)

oh, an unfortunate name
is there any established naming convention then?
maybe .se?
I thought that s expressions are commonly used in ocaml code bases for configurations? or that’s a JaneStreet/dune thing?

I think it’s a dune/JS thing. Possibly inherited from emacs?

I don’t know of any established naming convention. If you don’t need the specific file URLs to pass the URL filtering then .sexp is good (e.g., for the github example above, people should still be able to clone the project, just not view that specific file online in the web UI). Otherwise I guess .s-exp or .sxp would probably do. Idk, maybe someone will know of a common extension.

Yes .sexp is the standard extension (e.g. see the filenames in the documentation for GitHub - janestreet/sexp: S-expression swiss knife). I don’t know that sexps as configs are particularly common outside of JS projects/dune (although I wouldn’t let that stop you using them, I definitely prefer them to JSON/YAML).

3 Likes