Need advice about which tool to choose?Ask the StackShare community!

Clojure

1.9K
1.4K
+ 1
1.1K
Julia

621
666
+ 1
166
Add tool

Clojure vs Julia: What are the differences?

Introduction

This Markdown code provides a comparison between Clojure and Julia, discussing key differences between the two programming languages.

  1. Syntax: Clojure is a Lisp-like language that follows a prefix notation, while Julia adopts a traditional infix notation. This fundamental difference drastically affects the syntax of both languages, as well as the way code is written and understood.

  2. Type System: Clojure is a dynamically-typed language where variables are not assigned specific types, allowing for flexibility and ease of use. On the other hand, Julia employs a static type system, requiring explicit declaration and offering the potential for better runtime performance.

  3. Concurrency: Clojure has built-in support for managing concurrency through its Clojure STM (Software Transactional Memory) system and agents. This enables easier multi-threading and ensures safe and consistent coordination of shared resources. Julia, however, implements a different approach to concurrency, utilizing lightweight green threads that allow for the creation of millions of threads, each having its own stack, and managing them through a scheduler.

  4. Speed and Performance: Julia is renowned for its speed, particularly due to its just-in-time (JIT) compilation. It is designed to be as fast as traditional statically-typed languages like C or Fortran, providing excellent performance for numerical and scientific computing. Clojure, while expressive and powerful, is generally slower due to its dynamic nature and the overhead of running on the Java Virtual Machine (JVM).

  5. Community and Ecosystem: Clojure has a mature and vibrant community that has built an extensive ecosystem of libraries and frameworks, particularly with regards to web development. Julia, although relatively new, has a rapidly growing community and an increasing number of packages and libraries tailored specifically for scientific computing and data analysis.

  6. Interoperability: Clojure, being a dialect of Lisp, has great interoperability with other programming languages like Java and C. This allows seamless integration with existing Java or C libraries, maximizing code reuse and enhancing productivity. Conversely, Julia was built with a focus on native interoperability, making it easier to call functions and share data with other languages like Python, C, and R.

In summary, Clojure and Julia differ in their syntax, type systems, concurrency models, speed and performance, community ecosystems, and interlanguage interoperability. Each language has its own strengths and focuses, catering to different needs and use cases.

Decisions about Clojure and Julia

We’re a new startup so we need to be able to deliver quick changes as we find our product market fit. We’ve also got to ensure that we’re moving money safely, and keeping perfect records. The technologies we’ve chosen mix mature but well maintained frameworks like Django, with modern web-first and api-first front ends like GraphQL, NextJS, and Chakra. We use a little Golang sparingly in our backend to ensure that when we interact with financial services, we do so with statically compiled, strongly typed, and strictly limited and reviewed code.

You can read all about it in our linked blog post.

See more
Alexander Nozik
Senior researcher at MIPT · | 3 upvotes · 170.2K views
Migrated
from
JuliaJulia
to
KotlinKotlin

After writing a project in Julia we decided to stick with Kotlin. Julia is a nice language and has superb REPL support, but poor tooling and the lack of reproducibility of the program runs makes it too expensive to work with. Kotlin on the other hand now has nice Jupyter support, which mostly covers REPL requirements.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Clojure
Pros of Julia
  • 117
    It is a lisp
  • 100
    Persistent data structures
  • 100
    Concise syntax
  • 90
    jvm-based language
  • 89
    Concurrency
  • 81
    Interactive repl
  • 76
    Code is data
  • 61
    Open source
  • 61
    Lazy data structures
  • 57
    Macros
  • 49
    Functional
  • 23
    Simplistic
  • 22
    Immutable by default
  • 20
    Excellent collections
  • 19
    Fast-growing community
  • 15
    Multiple host languages
  • 15
    Simple (not easy!)
  • 15
    Practical Lisp
  • 10
    Because it's really fun to use
  • 10
    Addictive
  • 9
    Community
  • 9
    Web friendly
  • 9
    Rapid development
  • 9
    It creates Reusable code
  • 8
    Minimalist
  • 6
    Programmable programming language
  • 6
    Java interop
  • 5
    Regained interest in programming
  • 4
    Compiles to JavaScript
  • 3
    Share a lot of code with clojurescript/use on frontend
  • 3
    EDN
  • 1
    Clojurescript
  • 24
    Fast Performance and Easy Experimentation
  • 21
    Designed for parallelism and distributed computation
  • 18
    Free and Open Source
  • 17
    Dynamic Type System
  • 16
    Multiple Dispatch
  • 16
    Calling C functions directly
  • 16
    Lisp-like Macros
  • 10
    Powerful Shell-like Capabilities
  • 9
    Jupyter notebook integration
  • 8
    REPL
  • 4
    String handling
  • 4
    Emojis as variable names
  • 3
    Interoperability

Sign up to add or upvote prosMake informed product decisions

Cons of Clojure
Cons of Julia
  • 11
    Cryptic stacktraces
  • 5
    Need to wrap basically every java lib
  • 4
    Toxic community
  • 3
    Good code heavily relies on local conventions
  • 3
    Tonns of abandonware
  • 3
    Slow application startup
  • 1
    Usable only with REPL
  • 1
    Hiring issues
  • 1
    It's a lisp
  • 1
    Bad documented libs
  • 1
    Macros are overused by devs
  • 1
    Tricky profiling
  • 1
    IDE with high learning curve
  • 1
    Configuration bolierplate
  • 1
    Conservative community
  • 0
    Have no good and fast fmt
  • 5
    Immature library management system
  • 4
    Slow program start
  • 3
    JIT compiler is very slow
  • 3
    Poor backwards compatibility
  • 2
    Bad tooling
  • 2
    No static compilation

Sign up to add or upvote consMake informed product decisions

What is Clojure?

Clojure is designed to be a general-purpose language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming. Clojure is a compiled language - it compiles directly to JVM bytecode, yet remains completely dynamic. Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system.

What is Julia?

Julia is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar to users of other technical computing environments. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library.

Need advice about which tool to choose?Ask the StackShare community!

What companies use Clojure?
What companies use Julia?
See which teams inside your own company are using Clojure or Julia.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Clojure?
What tools integrate with Julia?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

GitHubGitPython+22
17
14209
GitHubGitDocker+34
29
42439
What are some alternatives to Clojure and Julia?
Scala
Scala is an acronym for “Scalable Language”. This means that Scala grows with you. You can play with it by typing one-line expressions and observing the results. But you can also rely on it for large mission critical systems, as many companies, including Twitter, LinkedIn, or Intel do. To some, Scala feels like a scripting language. Its syntax is concise and low ceremony; its types get out of the way because the compiler can infer them.
Haskell
It is a general purpose language that can be used in any domain and use case, it is ideally suited for proprietary business logic and data analysis, fast prototyping and enhancing existing software environments with correct code, performance and scalability.
Common Lisp
Lisp was originally created as a practical mathematical notation for computer programs, influenced by the notation of Alonzo Church's lambda calculus. It quickly became the favored programming language for artificial intelligence (AI) research. As one of the earliest programming languages, Lisp pioneered many ideas in computer science, including tree data structures, automatic storage management, dynamic typing, conditionals, higher-order functions, recursion, and the self-hosting compiler. [source: wikipedia]
Elixir
Elixir leverages the Erlang VM, known for running low-latency, distributed and fault-tolerant systems, while also being successfully used in web development and the embedded software domain.
Erlang
Some of Erlang's uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance. OTP is set of Erlang libraries and design principles providing middle-ware to develop these systems.
See all alternatives