sashaafm

sashaafm

I’m going to present an Elixir talk next week and I’m trying to gather a list of Elixir features that were inspired or modeled after other language features. Right now I’ve got the following list:

  • Syntax (Ruby)
  • Docstrings (Python)
  • Polymorphism and Protocols (Clojure)
  • Mix build tool (Clojure’s Leiningen and Ruby’s Rake)
  • Lazy evaluation (Haskell) → I’m not 100% certain on this one?
  • Pipeline operator (Clojure, but F# also has a similar one I believe)

I was thinking if ExUnit (aka built-in Unit Testing) also was inspired by any language? Probably by Ruby too, I guess.

Does anyone know of any other features that were inspired by other languages? :slight_smile:

Showing Posts 1 to 6

AstonJ

AstonJ

I think this is a great topic for a talk! :023:

Two notable omissions are Erlang (would be great to see where it has been most influential) and maybe mention pattern matching specifically as well?

sashaafm

sashaafm OP

Hey @AstonJ, I’m omitting Erlang since Elixir is built for the Erlang VM and it basically inherits all of Erlang’s features :blush:

Erlang also has Pattern Matching, although I’m not completely sure if Elixir expands it further than Erlang? From my limited Erlang experience I’d say they’re the same.

gregvaughn

gregvaughn

I personally wouldn’t list lazy evaluation as an elixir feature. Yes, with the Stream module you can achieve it, but it is done by the module, not core to the language.

If I recall, the pipeline operator comes most directly from F# which gets it from OCaml.

I think ExUnit comes most directly from Ruby, but really all the *Unit testing libraries go back to Smalltalk.

Macros were inspired by lisp in general, but you could name clojure specifically.

You could point out that hex is inspired by several dependency tools. I know ruby gems are one, but there are probably more.

If it were me giving the talk, I would want to mention erlang for the core concurrency model, though I understand your other comment that there’s so much elixir gets from erlang. You could point out that the pattern matching in both erlang and elixir comes from prolog.

josevalim

josevalim

Creator of Elixir

Also worth adding that I kept most of Erlang’s syntax for data structures purposedly, so Erlang plays a big role on the syntax side of things too.

Yup, docstrings and doctests come from Python.

And the @derive feature in protocols is inspired by a similar feature in Haskell’s type classes.

I wouldn’t say Rake had a big influence on Mix. My experience with Bundler played a bigger role on Mix for sure.

If by lazy evaulation you mean streams, then citing Haskell is correct although I wouldn’t call it lazy evaluation. :slight_smile: There was a lot of Haskell research involved for implementing streams in a purely functional fashion. The original idea came from Jessica Kerr’s talk on scalaz though. More info here: Introducing reducees « Plataformatec Blog

Not Clojure. It was from one of the ML variants (SML I think?) and F#.

sashaafm

sashaafm OP

Thank you so much for you reply @josevalim it’s good to have you correct and confirm my info before the talk :slight_smile:

About the macros and metaprogramming aspect of Elixir. It was inspired by Clojure, right? Or did you look at older Lisps directly?

josevalim

josevalim

Creator of Elixir

I remember looking at multiple Lisps. At least Common Lisp and Scheme to take an informed decision regarding hygiene and gensym. I cannot recall any special aspect from Clojure on this regard. Elixir ended-up having contextual hygiene (where variables belong to the modules that define them) which I don’t think I have seen elsewhere.

— All posts loaded —

Where Next? Top

Trending in Discussions Top

budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
axelson
Hi there! :wave: @frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
achempion
I’ve been using Emacs as my main code editor for more than a two years. It’s a custom build version although I’ve tried doom emacs and sp...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
jtormey
Lately I’ve been thinking about how to organize components as a LiveView application grows. One of the pain points I’ve found (for myself...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews