Home > Java > javaTutorial > body text

Scheming About Clojure

Patricia Arquette
Release: 2024-11-21 06:01:13
Original
758 people have browsed it

Scheming About Clojure

Clojure is a LISP for the Java Virtual Machine (JVM). As a schemer, I wondered if I should give Clojure a go professionally. After all, I enjoy Rich Hickey's talks and even Uncle Bob is a Clojure fan. So I considered strength and weaknesses from my point of view:

Pros

  • S-Expressions
  • Makes functional programming easy
  • Schemy naming with ? and ! suffixes
  • Integrated testing framework
  • Platform independence due to JVM
  • Simple Java interoperability
  • Clojure map type corresponds to JSON
  • Web-server abstraction with extensions (Ring)
  • Dedicated Ubuntu-based Docker image

Cons

  • Too many core functions
  • Too many concurrency concepts
  • Having collection functions and the sequence API is confusing
  • Keywords feels unnecessary, given symbols
  • Unwieldy default project structure
  • Leiningen feels forced upon you
  • Clojure is not just a single jar (anymore)
  • No integrated JSON parser

Insight

Clojure seems good enough. It is not flawless and somewhat overloaded, but far, far ahead of Javascript, Python, Go, or Rust. Of course, I would always prefer CHICKEN Scheme for any passion project. But in an environment that already runs databases written in Java, the JVM has street cred, and a large community hints at sustainability, Clojure presents itself as well balanced in novelty and stability. All in all, Clojure seems to be the enterprise Lisp.

References

  • https://clojure.org/reference/lisps
  • https://www.more-magic.net/posts/thoughts-on-clojure.html
  • The Clojure Workshop (Book)

The above is the detailed content of Scheming About Clojure. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template