ElixirCasts

ElixirCasts

Forum Sponsor

In this episode we’ll look at the @impl attribute and how it can be used to make code more readable.

Showing Posts 1 to 1

Fl4m3Ph03n1x

Fl4m3Ph03n1x

@impl is actually one of my favorite attributes. I do however use it in a different way, for example, in the code you showed I would have used @impl GenServer to make it clear which behaviour is being implemented.

The issue with this approach however, is that to avoid doing @impl MyApp.SomeModule.MyBehaviour everywhere, I usually have to put an alias call before, which messes up the Elixir style guidelines which say that an alias should be after a behaviour call.

But oh well, good to know you’re still rocking!

— All posts loaded —

Where Next? Top

Trending in Screencasts Top

lubien
Several weeks ago I was nerd snipped by browsers support for View Transitions API and took to myself to see how that goes in LiveView. Af...
New
Potions
Sooner or later you’ll need to run a one-off or recurring task on a deployed app, and if you deploy with releases the usual answer, a Mix...
New

Other Trending Topics Top

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
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
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
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews