

Emacs script pitfalls - pmoriarty
http://www.lunaryorn.com/2014/08/12/emacs-script-pitfalls.html

======
michaelsbradley
At the end of the write-up, the author suggests "put[ting] your hands on a
decent functional language [such] as OCaml or Haskell."

Racket would be another fine alternative, for those who would like to do
command-line scripting in a Lisp but prefer a more robust language (than Emacs
Lisp) with excellent support for functional programming patterns:

[http://docs.racket-lang.org/guide/scripts.html](http://docs.racket-
lang.org/guide/scripts.html)

~~~
pmoriarty
I'd add Chicken Scheme[1], which allows you tune the amount of safety the
compiler offers you (if that matters to you), along with many other nice
features.

And, as long as we're talking Schemes, perhaps the most appropriate Scheme for
Emacs users to try is Guile,[2] for its integration in to Emacs.[3]

That said, no Scheme (or Lisp) can be properly called a "functional language".
They are multi-pradigm languages. You can write in a functional style in them,
but you are not forced to do so. Same with OCaml, for that matter.

[1] - [http://www.call-cc.org/](http://www.call-cc.org/)

[2] -
[https://www.gnu.org/software/guile/](https://www.gnu.org/software/guile/)

[3] -
[http://www.emacswiki.org/emacs/GuileEmacs](http://www.emacswiki.org/emacs/GuileEmacs)

~~~
michaelsbradley
Sure, Racket is not a functional language in the same sense as Haskell, Pure,
Clean, etc.

However, some Lisps/Schemes go further than others to support and promote
programming in a functional style. I'm unfamiliar with Chicken Scheme and
haven't spent any time with Guile, so I can't comment on those languages.

Racket and Clojure, in my experience, both tend to heavily favor the
functional style with respect to their core libraries and defaults regarding
im/mutability.

