mmport80

mmport80

I have put far too much effort into Dialyzer over the last year or so - and basically - I doubt it’s worth the effort.

It’s not as easy to use as type inference in statically typed functional languages, and you don’t get as much bang for the buck with its super optimistic success typing.

Perhaps some sort of saner alternative would be an option for Elixir 2.0?

I often think Clojure is the closest language to Elixir - Clojure spec and gradual typing sound v interesting.

Thoughts? Perhaps Dialyzer is better than I give credit, would like to hear some good counter-arguments ; )

Showing Posts 1 to 6

PatNowak

PatNowak

Dialyzer won’t work in many cases, but the most important for me if I see @spec above the function definition is that I’ more confident what should be input and output for that function. It’s easier to see one line of typespec than to analyze function’s behavior.

Qqwy

Qqwy

TypeCheck Core Team

I fully agree with @PatNowak. The usage of @specs goes further than using Dialyzer. I find it very helpful that functions clearly indicate what input/output they receive, especially because Elixir is dynamically typed.

Dialyzer’s main purpuse, in my opinion, is to make sure that the written @specs match the function’s implementations. I completely agree that it is less nice to use than typing in a statically typed language, but even when not using Dialyzer, do not underestimate the @spec.

bobbypriambodo

bobbypriambodo

I pretty much share the sentiment. Having types guide your development is a benefit I get when developing with OCaml, Haskell, Java, etc.

I tried to get the typechecking more streamlined with my dev by integrating Dialyxir as a linter in Atom. I was surprised at first that it doesn’t exist already, but as I developed the package myself I can guess why anyone doesn’t bother; it’s kinda slow, even for a small project built on top of Phoenix, and the output is not easily parse-able. I finally just create a command using process-palette that will run mix dialyzer and I execute it every once in a while.

I however agree that the @specs helps a whole lot as documentation, especially when it shows on atom-elixir’s autocomplete. Types are great ^^

mmport80

mmport80 OP

As long as you have Dialyzer in your build process - i suppose that’s v true - keeps some verifiable documentation front and centre.

mmport80

mmport80 OP

Yup, that’s part of the problem, in order for specs to be useful you have to use Dialyzer - and it’s not a great tool…

mmport80

mmport80 OP

I however agree that the @specs helps a whole lot as documentation, especially when it shows on atom-elixir1’s autocomplete. Types are great ^^

Oh that is v cool - I have been using VS Code for too long : )

— 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
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
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
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

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
JesseHerrick
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
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
georgeguimaraes
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews