4 ms·
Lisp has used directives in comments in the past. Only on the first line of a file but they were parsed.
by rjsw 12y ago
Lisp has used directives in comments in the past. Only on the first line of a file but they were parsed.
- Grue3 12y agoThat had to be very distant past or some non-standard lisp. Common Lisp has no such feature.
- rjsw 12y agoIt was done on Lisp Machines and currently in CCL.
- lispm 12y agoThat's a feature of the Lisp IDE. File mode lines described language, the syntax (which Lisp dialect), the Package, the numeric base, the encoding, ... Example: ;;; -*- Mode: lisp; Syntax: ANSI-Common-Lisp; Package: http; Base: 10 -*- But to implement compiler directives in Common Lisp, this is not needed. That can already be done with macros and reader macros. If you for example use a macro in source code, the compiler will need to expand it. That allows arbitrary code execution during compilation.