emeidell

emeidell

I am preparing a meetup Lightning talk on Documentation and the importance of it. I love that in the Elixir docs is states “Elixir treats documentation as a first-class citizen”. I love this but why do we? Does the importance come from bad experience and this is our revenge? (This is not my view but just sparking discussion)

I would love your insight on the why and how would you explain this to someone first coming into this language.

Showing Posts 1 to 4

yawaramin

yawaramin

In my opinion, documentation is a requirement for a welcoming community. Sure, you don’t really need documentation if you’re motivated to learn the tech. But good documentation lowers the effort barrier and sends a signal that the community cares about newcomers.

emeidell

emeidell OP

That’s a good point! By documenting you are inviting people to learn. I like that! Thanks!

Qqwy

Qqwy

TypeCheck Core Team
  1. The learning point that @yawaramin already mentioned.
  2. Documentation is the only tool we have to convey important information to the user of our interfaces. In many languages, the concepts of ‘Documentation’ and ‘Commenting’ are conflated, but they are different:
  • Comments are something you write in your code to help you and future maintainers understand why you made a certain implementation choice (like picking a less aesthetically pleasing solution because the performance difference mattered here, or make a note that yes, this line is required because otherwise a race-condition would happen in situation X, etc.). Side note: Comments should not tell you what happens (because, hopefully, the code itself already does this).
  • Documentation, on the other hand, is for people using your code, who need to know the rules your code expects of them. This is even more important in a weakly-typed environment than a strongly typed one, because there are less ways to enforce rules on the end user (to ‘make invalid states impossible’) so the only tool we still have is communication between humans.

The nice thing about making documentation first-class (rather than having documentation ‘tacked on’), is that it is a lot easier for people to find and use it! I find myself using iex’s h helper very often, because it is so much quicker than browsing on the internet to look for the documentation of packages/modules that I already have installed on my local system.

dimitarvp

dimitarvp

That was honestly one of the things that made an excellent first impression to me ~2.5 years ago with Elixir.

People on Reddit and HN have called Elixir “a language with good marketing” many times and I find myself in agreement with them… although I think the community should definitely go next-level and prepare several topical Wiki-like posts here in ElixirForum; it’s a natural next step IMO (this post is an excellent example of what I have in mind: HTTP client libraries and wrappers).

Elixir has very no-BS noob experience and this definitely won me over as the jaded C / C++ / Java / PHP / Javascript / Ruby programmer that I was back then.

(Anti-example: deployment. I found Distillery really quick to start with but there’s so many manual steps to do that I have to wonder why are there no wrappers or generators yet. Hell, even if they require 20 CLI parameters I’ll still take it, deployment shouldn’t be such a delicate and brittle job).


So to answer @emeidell – documentation is important because there’s very good tooling that can be built around it (ex_doc; seamlessly building documentation is extremely important for wide adoption, including in corporations) and because it’s a very good marketing tool to show initiating programmers that the language is community-friendly.

— 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
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
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
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
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
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
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
gtcode
Aloha gang, There’s a new class of AI model out from TypeSafe. Jev is their flagship model. You can learn about it here: ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews