Pregunta

".el" is the convention for filename ending with Emacs Lisp programs. What is the convention when writing Common Lisp programs, please?

¿Fue útil?

Solución

Wikipedia and the Google Common Lisp Style guide both suggest .lisp.

Practical Common Lisp suggests .lisp or .cl.

Note, I'm not a Common Lisp programmer by any measure, so I have no idea if .lisp is actually used in practice.

Otros consejos

Common Lisp pathname types for source code:

  • lisp is the default. Use this if possible.
  • lsp if the pathname type allows only three characters
  • l if the pathname type should be one character (rare).

The pathname type cl is mostly not used. You can see it sometimes in older code or projects which use several different Lisp dialects.

For compiled code the pathname type can be computed in Common Lisp using the function COMPILE-FILE-PATHNAME (here 64bit LispWorks on a Mac):

CL-USER > (pathname-type (compile-file-pathname "foo.lisp"))
"64xfasl"
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top