Shaun Lebron writes about Clojure(Script) and Lisp tooling, including Parinfer, plus visual explainers and small game projects.
Commenters discuss Parinfer as an intuitive way to handle Lisp parentheses, though some still prefer Paredit, and recommend his GitHub work on ClojureScript.
Hi :)
I feel your pain here and just wanted to let you know how common this is for programmers who initially try out Lisp for the first time. As others have alluded to, I promise this initial "parenthesis shock" goes away rather quickly as you read and write Lisp code. In my direct experience, I have hired junior developers straight out of a coding bootcamp who were able to pick up ClojureScript in their first week using Sublime Text with no editor extensions. In other words: you can definitely do this; it's not magic.
I would strongly encourage you to check out Parinfer [1]. Parinfer makes indentation "significant" so you never have to worry about "closing the parens". Basically, if you can handle Python or CoffeeScript indentation, you can handle Lisp. There are no hotkeys to learn and it is available in most common editors today.
For a first project I would recommend rewriting something you have already written and are familiar with. That way you can focus on just the language and not worry about the problem domain or "how to solve it". Just do a 1-to-1 port of something you've already done and compare how the two solutions are the same or different.
I'm sorry you are being downvoted and being told to "just use emacs" or "use the REPL more". IMO, these are not helpful suggestions for someone new to the language.
Good luck. You won't regret learning Clojure. One of the best things I have ever done for my career.
[1]:https://shaunlebron.github.io/parinfer/
As Evan Czaplicki (creator of Elm) said:
“If functional programming is so great, why is it still niche? We have a product that can practically eliminate runtime errors, make refactoring much easier, lighten the testing burden, all while being quite delightful to use. What’s the hold up?”
- http://www.elmbark.com/2016/03/16/mainstream-elm-user-focused-design
I'm just getting into Clojure and enjoy working with it so much that I don't care if there are job opportunities at the end of it to justify the time investment and mind-reboot. It's the first language that I didn't feel like I was fighting, and Parinfer has made all those “weird parentheses“ a joy: https://shaunlebron.github.io/parinfer/
That said, there do seem to be more opportunities than last time I looked at Clojure/Scala/Haskell (Functional Works, mentions in HN Who's Hiring) – it feels like people are waking up to FP ideas after React stormed the front-end scene.
More than it not being possible, it's not regarded as desirable - IntelliJ users greatly value consistency. The fact that the experience is consistent across different languages is one of the things I like best about IntelliJ. Can you give me an idea of the sort of thing that you'd like to see that you haven't seen?
Here's an example of something I recently added (an inline inspector), that my main competitor (VS Code) said wasn't possible with the VS Code APIs: https://cursive-ide.com/blog/cursive-1.14.0-eap1.html. I have another major feature that I don't have good online doc for, which is also not possible with the VS Code API (parinfer, a Clojure editing mode). This gives you an idea of what it looks like, but this is old and my implementation doesn't work much like this any more: https://shaunlebron.github.io/parinfer.
For anyone who'd be interested in trying a Lisp (with Clojure probably being the most mainstream one at the moment) and who's been put off by the parens, paredit and/or Emacs:
- Parinfer [https://shaunlebron.github.io/parinfer/] - makes the parens follow indentation and vice versa and effectively makes them a non-issue at worst and a great advantage at best (you can combine it with paredit later on to perform all kinds of ninja magic when editing code)
- Cursive [https://cursive-ide.com/] - a Clojure plugin for IntelliJ IDEA for a more 'just works' experience. Integrates parinfer, among other things, and is generally pretty great (I'm a happy customer).
And last but not least - rainbow parens to keep nested expressions readable. Pretty much every Lisp editor has them more or less out of the box.
The vast majority of Lisp code is assiduously written with nested indentation! So that can't be it.
Non-lisp languages have parentheses, brackets and braces, using indentation to clarify the structure. Nobody can reasonably work with minified Javascript, without reformatting it first to span multiple lines, with indentation.
Lisp has great support for indentation; reformatting Lisp nicely, though not entirely trivial, is easier than other languages.
Oh, have you seen parinfer? It's an editing mode that infers indentation from nesting, and nesting from indentation (both directions) in real-time. It also infers closing parentheses. You can just delete lines and it reshuffles the closers.
The github.io site has animations:
https://shaunlebron.github.io/parinfer/
People who use Parinfer rather than Paredit when learning Clojure really like it. The concept is available in the Clojure mode in all the usual suspects of IDEs (IntelliJ Cursive, emacs Cider, etc.)
https://shaunlebron.github.io/parinfer/
The size of the community is not as important as the value of what is available. It's just not widely known, or maybe there's still much potential yet unrealized.
This is an oldie but a goodie on how interactive an experience you can have when using Clojure on the front end and backend of a web app:
https://figwheel.org/
This project is the most recent and most promising iteration of someone making a very visual interactive tool for introspecting on data structures in the REPL environment
https://github.com/djblue/portal