Software Alternatives, Accelerators & Startups

Hy VS Clojure

Compare Hy VS Clojure and see what are their differences

Hy logo Hy

Hy is a wonderful dialect of Lisp that’s embedded in Python.

Clojure logo Clojure

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.
  • Hy Landing page
    Landing page //
    2022-04-30
  • Clojure Landing page
    Landing page //
    2023-09-19

We recommend LibHunt Clojure for discovery and comparisons of trending Clojure projects.

Hy features and specs

  • Python Interoperability
    Hy seamlessly integrates with Python, allowing you to use the entire Python ecosystem while writing your code in a Lisp-like syntax. This interoperability makes it easier for developers familiar with Python to experiment with Lisp's syntax and ideas.
  • Lisp Syntax and Macros
    Hy provides Lisp's powerful macro system and syntax, enabling more expressive and concise code. The ability to create macros can lead to highly customizable and domain-specific solutions.
  • Readability
    For those familiar with Lisp, Hy offers increased readability due to its minimal syntax and symbolic expressions. This can lead to more straightforward reasoning about the code and reduced syntactic noise.
  • Compiles to Python
    Hy code is compiled to Python bytecode, allowing it to run on any environment where Python is available. This ensures good performance and compatibility with existing Python tools and utilities.

Possible disadvantages of Hy

  • Steep Learning Curve
    For developers not familiar with Lisp, Hy's syntax and concepts (like macros) can be difficult to grasp initially. This can slow down development time as developers need to learn new paradigms.
  • Limited Adoption
    Hy is not as widely adopted or supported as some other languages or even other Lisp implementations. This can lead to less community support, fewer third-party libraries written specifically for Hy, and potentially more difficulty finding solutions to problems.
  • Debugging Complexity
    Debugging in Hy can sometimes be more challenging because errors may occur in the compiled Python code rather than the original Hy code, which can complicate traceback and error understanding.
  • Macro Overuse
    While macros are a powerful feature, their misuse can lead to code that is hard to read and maintain. This can become a con if developers do not exercise restraint and best practices in their use.
  • Performance Overhead
    While Hy compiles to Python, the added layer of abstraction and translation may introduce small performance overheads compared to writing natively in Python, especially for performance-critical applications.

Clojure features and specs

  • Functional Programming Paradigm
    Clojure emphasizes immutability and first-class functions, which can lead to more predictable and maintainable code.
  • Interoperability with Java
    Clojure runs on the JVM, allowing seamless integration with the vast ecosystem of Java libraries and tools.
  • REPL Driven Development
    Clojure's Read-Eval-Print Loop (REPL) allows for interactive programming, making it easier to test and debug code in real time.
  • Concise Syntax
    Clojure's syntax is minimalistic and expressive, which can lead to more concise and readable code.
  • Concurrency Support
    Clojure provides strong support for concurrent programming with features like Software Transactional Memory (STM) and immutable data structures.

Possible disadvantages of Clojure

  • Steep Learning Curve
    The functional programming paradigm and Lisp-like syntax can be challenging for newcomers, particularly those from imperative programming backgrounds.
  • Performance Overhead
    Clojure's emphasis on immutability can introduce performance overhead compared to languages that use mutable data structures.
  • Limited Tooling
    While improving, the ecosystem for Clojure is not as mature as for some other mainstream languages, which can pose challenges in finding robust development and debugging tools.
  • Less Mainstream
    Clojure is not as commonly used as languages like Python or Java, which can make it harder to find experienced developers or community support.
  • Verbose Error Messages
    Error messages in Clojure can sometimes be verbose and difficult to understand, which can complicate the debugging process.

Hy videos

HY-IMPACT muscle massager review (incredible)

More videos:

  • Review - Cleveland Launcher XL Hy-Wood Review
  • Review - HY Extracts (Jack Herer) Review

Clojure videos

What is the business value of Clojure?

More videos:

  • Review - Blog in Clojure Code Review
  • Review - Clojure Web App Code Review

Category Popularity

0-100% (relative to Hy and Clojure)
Programming Language
22 22%
78% 78
OOP
23 23%
77% 77
IDE
100 100%
0% 0
Generic Programming Language

User comments

Share your experience with using Hy and Clojure. For example, how are they different and which one is better?
Log in or Post with

Social recommendations and mentions

Based on our record, Clojure should be more popular than Hy. It has been mentiond 39 times since March 2021. We are tracking product recommendations and mentions on various public social media platforms and blogs. They can help you identify which product is more popular and what people think of it.

Hy mentions (9)

  • Python's “Disappointing” Superpowers
    Hy: https://docs.hylang.org/en/stable/ I tend to stick to vanilla python though, mainly because Hy is too much of an hassle for my use cases. - Source: Hacker News / over 2 years ago
  • Why Lisp?
    Q: is there any game dev happening in Lisp? A: https://kandria.com/ and https://itch.io/jam/lisp-game-jam-2022 Q: how do I write a website with Lisp? A: https://lispcookbook.github.io/cl-cookbook/web.html#easy-routes-hunchentoot and https://www.gnu.org/software/guile/manual/html_node/Web-Examples.html Q: do I have to use emacs for developing Lisp? A: No, https://github.com/vlime/vlime and... - Source: Hacker News / over 2 years ago
  • How trying new programming languages helped me grow as a software engineer
    I really like Hy because it's fully inter-operable with Python. But its documentation is insufficient for anything moderately complex, and its tooling support is pretty basic. If Hy were well documented and supported I'd use it for all my throwaway scripts and prototyping -- today I use Python for that. Source: over 2 years ago
  • Every programmer ever.
    You're looking for https://docs.hylang.org/en/stable. Source: over 2 years ago
  • Val on Programming: What makes a good REPL?
    I've been using the Hy REPL[0] whenever I've wanted to drop into a python REPL. The lack of whitespace formatting with Hy is great, but it still has access to all of python's libraries. [0] - https://docs.hylang.org/en/stable/. - Source: Hacker News / over 2 years ago
View more

Clojure mentions (39)

  • Create a Server Driven CLI from your REST API
    Another project of mine Bob can be seen as an example of spec-first design. All its tooling follow that idea and its CLI inspired Climate. A lot of Bob uses Clojure a language that I cherish and who's ideas make me think better in every other place too. - Source: dev.to / 3 months ago
  • 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:. - Source: dev.to / 6 months ago
  • Moving your bugs forward in time
    ‍For the rest of this post I’ll list off some more tactical examples of things that you can do towards this goal. Savvy readers will note that these are not novel ideas of my own, and in fact a lot of the things on this list are popular core features in modern languages such as Kotlin, Rust, and Clojure. Kotlin, in particular, has done an amazing job of emphasizing these best practices while still being an... - Source: dev.to / 12 months ago
  • Let's write a simple microservice in Clojure
    This article will explain how to write a simple service in Clojure. The sweet spot of making applications in Clojure is that you can expressively use an entire rich Java ecosystem. Less code, less boilerplate: it is possible to achieve more with less. In this example, I use most of the libraries from the Java world; everything else is a thin Clojure wrapper around Java libraries. - Source: dev.to / about 1 year ago
  • A new F# compiler feature: graph-based type-checking
    I have a tangential question that is related to this cool new feature. Warning: the question I ask comes from a part of my brain that is currently melted due to heavy thinking. Context: I write a fair amount of Clojure, and in Lisps the code itself is a tree. Just like this F# parallel graph type-checker. In Lisps, one would use Macros to perform compile-time computation to accomplish something like this, I think.... - Source: Hacker News / over 1 year ago
View more

What are some alternatives?

When comparing Hy and Clojure, you can also consider the following products

CLISP - CLISP is a portable ANSI Common Lisp implementation and development environment by Bruno Haible.

Elixir - Dynamic, functional language designed for building scalable and maintainable applications

Steel Bank Common Lisp - Steel Bank Common Lisp (SBCL) is a high performance Common Lisp compiler.

Python - Python is a clear and powerful object-oriented programming language, comparable to Perl, Ruby, Scheme, or Java.

Racket Lang - Racket (formerly PLT Scheme) is a modern programming language in the Lisp/Scheme family, suitable...

Rust - A safe, concurrent, practical language