Latest #code-style Threads Top

camstuart
Hello, I am somewhat new to Elixir, and finding that I am having difficulty grasping how I should handle logic for a series of sequences...
New
kccarter
Looking for some advice on how a seasoned Elixir developer might go about implementing the creation of a map/struct that is dependent on ...
New
IwoHerka
When creating multiple clauses for a function, should I provide typespec for each one? Example: @spec foo([]) :: {:error, any} def foo([...
New
Cifer-Y
I apologize for not being able to describe my question clearly in the title. I’m not sure how to name this coding pattern. Recently I f...
New
overcomeoj
What is the community guidelines on when you should pattern match a function vs when you should write its own? Eg: Style 1 Extract some...
New
oliverandrich
I am currently building a small library that has to traverse a tree of nodes and transform this tree into a document. This tree traversal...
New
tensiondriven
I’ve looked around for information on this in the mix format source, custom mix formatters, Elixir style guides, and haven’t found anythi...
New
98thpixel
Hello everyone! I have a non-FP programming background (C++, Swift, Javascript) and started to learn Elixir/Phoenix a while ago. As I pr...
New
jonathan-scholbach
I find myself using a lot of very long with-statements. The functions in the with pipeline return {:ok, result} or some {:error, :error_t...
New
jswny
Does anyone know if there’s a way to enforce the usage of a guard clause for each argument of each function? I want to enforce this style...
New

This Week's Trending Top

This Month's Trending Top

This Year's Trending Top

christopheradams
I was recently asked to step up and become the maintainer for the Elixir Style Guide. It was, I believe, the first, and is now the most p...
New

Last Three Year's Trending Top

gerbal
Is there a recommended ordering of require, use, import, and alias? Does the style guide have anything to say about the preferred orderin...
New
stratacast
Hey everyone! This is my first time posting on here, and I’m getting started with writing some real Elixir code! I’m not new to programm...
New
kccarter
Looking for some advice on how a seasoned Elixir developer might go about implementing the creation of a map/struct that is dependent on ...
New
camstuart
Hello, I am somewhat new to Elixir, and finding that I am having difficulty grasping how I should handle logic for a series of sequences...
New
IwoHerka
When creating multiple clauses for a function, should I provide typespec for each one? Example: @spec foo([]) :: {:error, any} def foo([...
New

Trending Over Three Years Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
GenericJam
I’m trying to find a cleaner coding style for what I’ve got happening repeatedly in my code right now. This is looking very pyramid of do...
New
Travis
Completely new to Elixir, but have an issue I am trying to figure out: When interviewing candidates for Javascript roles I usually have ...
New
david234
I have this form <%= form_for @conn, Routes.admin_products_path(@conn, :create_product), [as: :create_product, id...
New
PJUllrich
I’m extracting many fields from a map using pattern-matching against the function parameter. Sometimes only a single field is missing fro...
New
minhajuddin
I am using the code below to generate room ids: reservations = [%{rooms: 1}, %{rooms: 2}, %{rooms: 3}]...
New
Rich_Morin
I recently wrote some Elixir to format a list of strings (eg, author names) for output. I think it’s reasonably idiomatic, but I probably...
New
Papillon6814
Hello. I’m thinking the way to handle nil in case. |> case do x when not is_nil(x) -> ... {:ok, "xxxxxx"} nil...
New
niels_bom
While learning Elixir I’ve been writing and rewriting some practice functions. Some of the rewriting was to ensure recursive functions ar...
New
verilog
Hello, I’m new to Elixir. I was reading about the macros of Elixir but didn’t quite get it. I know C and familiar with its marcos. Alth...
New
raytracer
Hello, Elixir noob here! I’ve started a small project to learn Elixir. I have a map: map = %{ id: "100" } The id value is a string ...
New
anildigital
Here is list of plugins for different editors Sublime Text 3 — Elixir.tmbundle - https://github.com/elixir-editors/elixir-tmbundle/#co...
New
tensiondriven
I’ve looked around for information on this in the mix format source, custom mix formatters, Elixir style guides, and haven’t found anythi...
New
CharlesO
I was watching this video on Elm and came across this feature: Elm Format. Please is there a similar helper for any of the IDEs/ code e...
New
purplesquirrel
I have a function work that get’s a record, requests data from a remote api and updates that record or returns some error tuples. It’s p...
New
  • Follow
  • Join
  • Shape
the conversation

Latest on Elixir Forum

Elixir Forum

Similar Portals

    None added yet

We're in Beta

About us Mission Statement