ElixirCasts

ElixirCasts

Forum Sponsor

@impl Attribute

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

Most Liked

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!

Where Next?

Popular in Screencasts Top

ElixirCasts
In this episode we’ll look at the @impl attribute and how it can be used to make code more readable.
New
ityonemo
Hey all! Following the fantastic blog post by the erlang team (A brief introduction to BEAM - Erlang/OTP) I made a video that quickly d...
New
omgneering
I made a video for getting started with the GenServer module. I introduce some concepts and try go over what's happening step by step. ...
New
ElixirCasts
I made a video to cover the basics of routing in Phoenix. https://elixircasts.io/phoenix-routes
New
CinderellaMan
Hands-on Elixir & OTP: Create a cryptocurrency trading bot - Ep. 16 - Add end-to-end tests elixir | otp | learning | screencast | cry...
New
plicjo
I created a tutorial for implementing a toggle button in LiveView. It’s been done against Phoenix 1.7 to future-proof it, ...
New
ElixirCasts
I made a screencast exploring how to use Phx.Gen.Auth to handle authentication. https://elixircasts.io/using-phx_gen_auth-for-phoenix-au...
New
sjm
Hello Everyone, i hope you are doing fine! I would like to draw your attention to the Elixir Mentor YouTube channel by Jacob Luetzow. T...
New
ElixirCasts
Hello everyone, these are the episodes that are part the Alchemist’s Edition, which is the paid subscription that helps support ElixirCas...
New
zacksiri
At Codemy.net we are always trying to find solutions for problems in a way that works well. As a result we’ve been able to create a beaut...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
AstonJ
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement