I have been using Common Lisp for a while and I like it because it’s fast and it’s a practical language but I haven’t used all its interactivity power eg redefining functions while the program is running. And although I haven’t tried it slime seems like one of the main reasons why one should choose Common Lisp.
But I’m curious about Racket. I actually started with scheme by studying SICP and the little schemer. Racket has a better theoretical PL foundation; hygienic macros may be more powerful than Common Lisp macros. Racket also seems like a very practical language-it has a a lot of libraries and better documentation than Common Lisps ecosystem. Racket is mostly functional which I like. I feel I could write a non trivial web service in racket. Also I really love the idea of building DSLs and racket is better for this and I like how the parser generator and lexer are built into the language.
Overall Racket seems like a better language than Common Lisp but still can’t decide whether to choose racket for some reason.
Can someone here who has experienced with both tell me why you chose Racket over Common lisp?
Thanks
Package management; specifically publishing yours. These days Common Lisp implementations mostly support QuickLisp, but you have to rely on someone else to update the package information, and that was last done in February as of this writing in June. Racket, you just fill out a form on the web page and within a day it shows up in the official package list. And I don't think any CLs provide QuickLisp out of the box, unlike raco pkg.
I prefer Scheme style syntax macros over Common Lisp style ones. Especially Racket's syntax-parse macros.
Racket comes with support for things like sockets and threads; CL (And Scheme) implementations support them but as extensions or non--standard libraries.
I prefer LISP-1 over LISP-2 models; I like that functions don't need special syntax to be passed as an argument to a function or called.
On the other hand, I think CLOS is a better object system than Racket's. But the handiest thing, generic methods, are available.
The way you can connect to a running common lisp instance and update functions and stuff interactively is nice for development and testing, but sounds like a potential headache if it happens in development - different instances of what are supposed to be the same software with different functions being used can get real confusing real fast.
CL's conditions are way more powerful for error handling and recovery than Racket exceptions - but they're also very rooted in the aforementioned interactivity.
I don't think CL has anything as general purpose as Racket's continuations and prompts, though it has syntax that addresses the most common use cases people seem to have for them.
Strong typing via Typed Racket is handy, if counter to classic Lisp tradition of dynamic typing. CL has Coalton these days though, and type hinting that compilers can make use of.
Overall, while I think there's plenty of nice/interesting things about Common Lisp, I prefer Racket and Scheme.
I think it depends on your application: I’m sure it can be useful when prototyping something, but I’m equally sure modifying a live application to fix a bug can be dangerous in production.
I made a mistake that tripled my work because I jumped in and made the problem worse. I had to fix my own mess AND the original problem.