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

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
maennchen
:warning: Security advisory: Decimal DoS vulnerability A vulnerability has been published for decimal where very large exponents can cau...
New
marciol
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
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

marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
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
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews