r/functionalprogramming • • Aug 21 '23
Question Clojure Or Haskell ?
I'm just starting my journey with functional programming and I wanna pick a language, what would suggest to start with, Haskell or Clojure and why choose one and not the other ?
23
Upvotes
View all comments
Show parent comment
2
u/aoeu512 Jul 04 '24
The enlightment of code is data, and data is code takes dedicated practice.
* Edit eval to use annotations for debugging and and add new features by hard coding some functions/macros into the interpreter itself. For the "notions of computation" sort-of like Haskell monads you only need to change the apply function and maybe evllist.
* If your code is slow maybe try quoting your code and using a macro that edits the code with quasiquoting and queries so that its more efficient like a step in a compiler
* Do you have a function that takes in data? Well how about adding features to your data perhaps by adding cases to your data, many of these may look like an interperter or part of an interpreter...
* Do remote calls by sending messages in quotes '(f arg1 :keyword arg2)
* Use parinfer/paredit to edit the AST itself, perhaps bind the EMACS hotkeys to a macro you wrote yourself to edit your code