Latest #module-attribute Threads 
A library I’m working on has a lot of functionality related to string prefixes (technically binaries, but they’re mostly strings). I have...
New
Prior to v1.18.0 I used the following vode to reach the struct definition in a module from __before_compile__/2 callback.
defp field...
New
Has anyone come up with a good way to create some form of module registry that can be used to lookup a module by name. My use case is to ...
New
I can “overwrite” native stdlib functions, just by not importing them from the kernel, right?
Like:
defmodule Filter do
Import Kernel...
New
Should module attributes reset after every function definition or does ExUnit reset @tag with macros?
Would I need @doc false for second...
New
so I was using MyModule.__info__(:attributes)[:behaviour] to make sure a module implements a behaviour but when the module has 2 or more ...
New
Given the following code:
defmodule MathOps do
@moduledoc """
This module provides math operations
"""
@doc """
This function...
New
I was just watching a conference video on pubsub and there was a module attribute defined with interpolation and passed as the topic id. ...
New
When a module attribute is based on the return of a function defined on another module, can we say we’ve a module dependency? Module A de...
New
Greetings comrades,
According to: https://elixir-lang.org/getting-started/module-attributes.html#as-constants
Every time an attribute ...
New
This Week's Trending
This Month's Trending
This Year's Trending
Last Three Year's Trending
Has anyone come up with a good way to create some form of module registry that can be used to lookup a module by name. My use case is to ...
New
A library I’m working on has a lot of functionality related to string prefixes (technically binaries, but they’re mostly strings). I have...
New
Prior to v1.18.0 I used the following vode to reach the struct definition in a module from __before_compile__/2 callback.
defp field...
New
Trending Over Three Years
I have put some module attributes in my tests for easier reference, like this
@example Application.fetch_env!(:my_app, :thing)
but I no...
New
I have 2 modules, one of them has a function that returns a list and the other one is using that function to create a module attribute.
...
New
Hi!
I’ve been tinkering with bringing Clojure.spec to Elixir (I’m aware of prior art here, but want to experiment with a different synta...
New
Greetings comrades,
According to: https://elixir-lang.org/getting-started/module-attributes.html#as-constants
Every time an attribute ...
New
While looking over the source code for a library I’m using, I noticed that there were several times that the same module attribute (@para...
New
Background
I have to read a CSV and currently this is happening at compile time as the function runs in a module attribute:
# Imagine th...
New
Given the following code:
defmodule MathOps do
@moduledoc """
This module provides math operations
"""
@doc """
This function...
New
How do I make this work in a defenum macro?
defenum EmailStatus, :email_status, @email_states
Right now, I’m getting:
warning: undef...
New
I am just doing some poking around with module attribute and I created the following code:
defmodule ModuleAttribute do
Module.registe...
New
When a module attribute is based on the return of a function defined on another module, can we say we’ve a module dependency? Module A de...
New
Hi
I’m trying to use module attributes in my typespec, but I get errors when I do this:
defmodule KitchenCalculator do
@ml :millilite...
New
Can you use custom attributes similar to @impl or @behaviour, but rather than using a callback function, only the function name is used (...
New
I was just watching a conference video on pubsub and there was a module attribute defined with interpolation and passed as the topic id. ...
New
The Elixir ecosystem has very convenient and powerful facilities for documenting code. These include Markdown, doctests, module attribute...
New
so I was using MyModule.__info__(:attributes)[:behaviour] to make sure a module implements a behaviour but when the module has 2 or more ...
New
- Follow
- Join
- Shape
the conversation
Latest on Elixir Forum
Get money off!
The Pragmatic Bookshelf
35% off any eBook
Manning Publications
45% off any item
ElixirCasts
10% off for life
The Pragmatic Studio
20% off any course
AppSignal
10% off for 12 months
Honeybadger
10% off for 12 months
Simply use coupon code "devtalk.com" or "elixirforum" at checkout!
Filter by Type:
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
- #ai
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #blog-post
- #ecto-query
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #hex









