4 ms·
Does anyone know of any lisps that have a type system that tames some of lisp's tendency to get unreadable as programs evolve? Or not a type system but some oth
by 6gvONxR4sf7o 2y ago
Does anyone know of any lisps that have a type system that tames some of lisp's tendency to get unreadable as programs evolve? Or not a type system but some other aspect of it to tame it?
All the metaprogramming is really cool, but sometimes it reads like the gnarliest abstract haskell you've ever seen, but without even the type signatures to guide you. Type systems and linters are the best tools I know for automatically taming code, but I can't really imagine how you would really keep lisp projects' tendencies in check without hamstringing all the reasons you'd reach for lisp.
- lisper 2y agohttps://en.wikipedia.org/wiki/Dylan_(programming_language) https://en.wikipedia.org/wiki/Dylan_(programming_language)
- JonChesterfield 2y agoTyped racket for a friendly approachable one, Shen for a overpowered complicated one.
- 6gvONxR4sf7o 2y agoThanks! I appreciate both recs!
- tmtvl 2y agoA Lisp with a type system? Sounds like Common Lisp to me. SBCL (I'd say as close to a de facto standard as it gets) even has pretty good compile time type checking. E.g. (defun foo (a b) (declare (type String a b)) (+ a b)) ; in: DEFUN FOO ; (+ A B) ; ; caught WARNING: ; Derived type of COMMON-LISP-USER::A is ; (VALUES STRING &OPTIONAL), ; conflicting with its asserted type ; NUMBER. ; See also: ; The SBCL Manual, Node "Handling of Types" ; ; compilation unit finished ; caught 1 WARNING condition The type checking is the main thing that drove me to switch from Scheme to CL in the first place, and I stuck around for the nice little things like restarts and continuable asserts.