Fl4m3Ph03n1x
Background
In a post I made about having static types in Elixir, someone mentioned the tool Gradualizer. This came as a surprise to me, as though I have seen and read quite a lot about Dialyzer, I have never seen an Elixir book mention Gradualizer.
Questions
I understand Gradualizer aims to provide static typing for erlang (and I suppose Elixir) via gradual typing, while Dialyzer takes a different approach.
But as someone who doesn’t understand the differences to both systems, this is new terrain.
- What is the main purpose of Gradualizer in regards to its ancestor? (to replace Dialyzer, be a competitor, improve upon it…)
- What are the main differences between one tool and the other?
- Why should I move to Gradualizer when Dialyzer has been the de facto tool for typing in erlang/elixir since… well, forever?
- Is Gradualizer ready for usage in real projects? (I understand it isn’t, please correct me if I am mistaken)
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hello,
I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind.
However, when I launch mix phx.server, I get an error...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
So i have been using ash framework for a while and i love it. However currently the issue im having with ash framework is the error handl...
New
Other Trending Topics
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
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
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
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
LostKobrakai
Dialyzer was build on the idea of success typing. This makes so that dialyzer can work even without user input, just based on code itself. It also tries to not report false positives quite heavily. But it comes with the downside of not detecting many of the error cases other static typing systems can detect. (The link below even argues that dialyzer is not a type system)
Gradualizer is a completely different approach. Afaik it doesn’t do type inference, so unless you manually provide typespecs it does nothing. But for the places you do provide them, it’ll statically check for errors even beyond what dialyzer would be able to detect or would acknowledge. The other big part between the lines is that you can gradually add type safety to your systems. It’ll work with as much typespecs as the code does provide.
For more details see this one:
https://github.com/josefs/Gradualizer/blob/master/talks/talk.md#comparison-with-dialyzer
Essentially both tools try to detect errors, but do that in quite different ways with therefore quite different tradeoffs.
dimitarvp
Have you used both tools in concert in a project? I’m curious since I’m considering it.
LostKobrakai
I have not. I’ve just seen the talk about gradualizer.
egze
Are there any tutorials/articles how to use gradualizer with Elixir?
Fl4m3Ph03n1x
@OvermindDL1 created Gradualixir ( GitHub - OvermindDL1/gradualixir: Gradualizer Mix Wrapper · GitHub ). Right now I think it is the best shot at using Gradualizer with Elixir. If you have any questions you can probably ask him.
OvermindDL1
I think gradualixir is in a slightly broken state due to recent changes in gradualizer (again), PR’s to fix welcome, and I probably need to track specific commits instead of master until gradualizer publishes it’s first release.
But when it works you just run
mix gradualizerto scan your whole project ormix gradualizer files.beam morefiles.beam path/**/to/files/*.beam, recommend to do individual files for now to work on errors at a time to fix things (when it’s in a working state). Gradualixir itself passes gradualizer (and dialyzer) with flying colors though.egze
I heard the Running in Production podcast where you talked about Gradualizer and other stuff. Very nice episode
You seem to follow the development of Gradualizer closely, do you know when it will stable enough to use and what the current state is?
OvermindDL1
Seems to be progressing fairly quickly, dev seems to have slowed lately as most of it is pretty well done now, mostly just needs more typespecs fixing broken typespecs. Other than that it’s usable now for most things, just more typespecs, lol.
Rich_Morin
The most recent commit to Gradualixir was almost two years ago. Can someone give me an idea of its current status and prospects? Is anyone using it as a production tool?
-r
Rich_Morin
(crickets…)