3 ms·
Take a look at this recent article about "Rascal", an attempt to combine Lisp-like macros with Haskell-like types and semantics. https://lexi-lambda.github.io/
by mbrock 10y ago
Take a look at this recent article about "Rascal", an attempt to combine Lisp-like macros with Haskell-like types and semantics.
https://lexi-lambda.github.io/blog/2017/01/02/rascal-a-haskell-with-more-parentheses/ https://lexi-lambda.github.io/blog/2017/01/02/rascal-a-haske...
You'll see that there is some serious value in Lisp-style programming that's only now being experimentally adapted to Haskell-style type systems (building on very recent research).
Teaser:
"Simple syntactic transformations are, of course, trivially defined as macros. Haskell do notation is defined as an eleven-line macro in rascal/monad, and GHC’s useful LambdaCase extension is also possible to implement without modifying Rascal at all. This is useful, because there are many syntactic shorthands that are extremely useful to implement, but don’t make any sense to be in GHC because they are specific to certain libraries or applications. Racket’s macro system makes those not only possible, but actually pretty easy."
"While the extent of what is possible to implement as derived forms remains to be seen, many useful GHC features seem quite possible to implement without touching the core language, including things like GeneralizedNewtypeDeriving and other generic deriving mechanisms like GHC.Generics, DeriveGeneric, and DeriveAnyClass."
The other major benefit of Lisp is interactivity. Haskell has a good REPL, but Common Lisp is way ahead. For example, you can call a function that incrementally recompiles and reloads your system's modules and dependencies. That is simply a function call; when the function returns, the new code is live. Even further, Common Lisp "exceptions" do not immediately unwind the stack, but gives you enormous power over error handling: the system can stop, let you redefine the erroneous function, and then continue where it left off.
I'd love to have the best of both worlds -- Haskell's static safety and rich type system, and Lisp's metaprogramming and interactivity -- but combining them coherently is a huge challenge, so both languages continue to exist as exemplars of two very different approaches which both have value.