3 ms·
That’s a hilarious but perfect piece of syntax. Do you know where it originated?
by twoodfin 5y ago
That’s a hilarious but perfect piece of syntax. Do you know where it originated?
- Jtsummers 5y agoPer: https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node106.html https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node106.html > Compatibility note: This construct is borrowed from the Interlisp DECL package; Interlisp, however, allows an implicit progn after the type specifier rather than just a single form. The MacLisp fixnum-identity and flonum-identity constructs can be expressed as (the fixnum x) and (the single-float x).
- vindarel 5y agoagreed^^ there are macros and libraries to bring a nicer syntax (of course). Exple: https://github.com/lisp-maintainers/defstar https://github.com/lisp-maintainers/defstar (defun* (sum -> real) ((a real) (b real)) (+ a b))
- nerdponx 5y agoThere is DECLARE, PROCLAIM, and DECLAIM. I always interpreted the latter to be a portmanteau of the former two.