# \#language-implementation

**URL:** https://forum.elixirforum.com/tag/language-implementation/514.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [Forth in Elixir](https://forum.elixirforum.com/t/forth-in-elixir/23682)

<div class="topic-metadata">

**Author:** [@sym\_num](https://forum.elixirforum.com/u/sym_num)\
**Replies:** 9\
**Last updated:** [July 13, 2025, 5:53am UTC](https://forum.elixirforum.com/t/forth-in-elixir/23682 "2025-07-13T05:53:09Z")

</div>

I created a Forth processor in Elixir. This is my hobby project. https://github.com/sasagawa888/Forth

---

## [Getting duplicates instead of unique values](https://forum.elixirforum.com/t/getting-duplicates-instead-of-unique-values/15713)

<div class="topic-metadata">

**Author:** [@Ryzey](https://forum.elixirforum.com/u/Ryzey)\
**Replies:** 6\
**Last updated:** [April 24, 2025, 8:46pm UTC](https://forum.elixirforum.com/t/getting-duplicates-instead-of-unique-values/15713 "2025-04-24T20:46:23Z")

</div>

I know that uniq/1 & uniq\_by/2 return a list of unique values, but what is the best way to get a list of duplicate values? I noticed that the code for uniq & uniq\_by could easily collect a list of duplicates while uniqu…

---

## [Use of anonymous functions (closures)](https://forum.elixirforum.com/t/use-of-anonymous-functions-closures/62499)

<div class="topic-metadata">

**Author:** [@nhpip](https://forum.elixirforum.com/u/nhpip)\
**Replies:** 4\
**Last updated:** [March 25, 2024, 3:49pm UTC](https://forum.elixirforum.com/t/use-of-anonymous-functions-closures/62499 "2024-03-25T15:49:35Z")

</div>

Recently I’ve found myself with code that looks something like: def foo(arg1, arg2, arg3...argN) do # Do some work, creating variables var1 = ... var2 = ... cond do Keyword.get(foo, :foobar) == abc && …

---

## [Why do we need to use Enum.into(%{})?](https://forum.elixirforum.com/t/why-do-we-need-to-use-enum-into/62346)

<div class="topic-metadata">

**Author:** [@nhpip](https://forum.elixirforum.com/u/nhpip)\
**Replies:** 14\
**Last updated:** [March 17, 2024, 12:43pm UTC](https://forum.elixirforum.com/t/why-do-we-need-to-use-enum-into/62346 "2024-03-17T12:43:50Z")

</div>

I know this is a really minor peeve, but why is this the case?: iex(cs@localhost)54\> %{key1: :i\_am\_a\_map\_whooot} |\> Enum.map(&(&1)) \[key1: :i\_am\_a\_maaa\_\_\_list\_\_what\_the?\] Yes I know that all I need to do is |\> Enum.int…

---

## [ExPression - evaluate user input expressions](https://forum.elixirforum.com/t/expression-evaluate-user-input-expressions/61126)

<div class="topic-metadata">

**Author:** [@mtvch](https://forum.elixirforum.com/u/mtvch)\
**Replies:** 4\
**Last updated:** [January 23, 2024, 8:42pm UTC](https://forum.elixirforum.com/t/expression-evaluate-user-input-expressions/61126 "2024-01-23T20:42:18Z")

</div>

I was looking for a library for safely evaluating expressions written by users but didn’t find one that would match my needs. I wanted it to be extensible, support all JSON data types, and have its syntax and semantics i…

---

## [Regarding \`end\_of\_expression\` metadata](https://forum.elixirforum.com/t/regarding-end-of-expression-metadata/60961)

<div class="topic-metadata">

**Author:** [@mhanberg](https://forum.elixirforum.com/u/mhanberg)\
**Replies:** 10\
**Last updated:** [January 17, 2024, 2:42pm UTC](https://forum.elixirforum.com/t/regarding-end-of-expression-metadata/60961 "2024-01-17T14:42:39Z")

</div>

The docs state: :end\_of\_expression - denotes when the end of expression effectively happens. Available for all expressions except the last one inside a \_\_block\_\_ (when :token\_metadata is true) My question is about “…

---

## [Underscored variables - which do you prefer, descriptive or not?](https://forum.elixirforum.com/t/underscored-variables-which-do-you-prefer-descriptive-or-not/52892)

<div class="topic-metadata">

**Author:** [@nhpip](https://forum.elixirforum.com/u/nhpip)\
**Replies:** 19\
**Last updated:** [January 7, 2023, 2:20pm UTC](https://forum.elixirforum.com/t/underscored-variables-which-do-you-prefer-descriptive-or-not/52892 "2023-01-07T14:20:42Z")

</div>

So I came from the Erlang world. Recently I got into a debate at work about underscored variables. Half of us (including me) do: def foo(\[\], \_byte\_count, \_file\_count, acc), do: acc def foo(\[node | tail\], byte\_count,…

---

## [How difficult would it be to add the infix notation à la Haskell?](https://forum.elixirforum.com/t/how-difficult-would-it-be-to-add-the-infix-notation-a-la-haskell/19143)

<div class="topic-metadata">

**Author:** [@massimo](https://forum.elixirforum.com/u/massimo)\
**Replies:** 25\
**Last updated:** [December 27, 2022, 3:03am UTC](https://forum.elixirforum.com/t/how-difficult-would-it-be-to-add-the-infix-notation-a-la-haskell/19143 "2022-12-27T03:03:23Z")

</div>

How difficult would it be to add the infix notation à la Haskell? I think it could improve readability on several occasions For example rem(5, 3) could be written as 5 \`rem\` 3 or Enum.into(list, %{}) list |\> Enu…

---

## [Enum.map\_join with a comprehension](https://forum.elixirforum.com/t/enum-map-join-with-a-comprehension/48477)

<div class="topic-metadata">

**Author:** [@cblavier](https://forum.elixirforum.com/u/cblavier)\
**Replies:** 7\
**Last updated:** [June 20, 2022, 11:27pm UTC](https://forum.elixirforum.com/t/enum-map-join-with-a-comprehension/48477 "2022-06-20T23:27:24Z")

</div>

Do you think a join option would be a good idea for comprehensions? Something like Enum.map\_join/2 that could map and join lists in a single pass. book\_ids = for book \<- books, join: ",", do: book.id If it looks like …

---

## [Does this have a name?](https://forum.elixirforum.com/t/does-this-have-a-name/48061)

<div class="topic-metadata">

**Author:** [@keep\_zen](https://forum.elixirforum.com/u/keep_zen)\
**Replies:** 5\
**Last updated:** [May 31, 2022, 3:39am UTC](https://forum.elixirforum.com/t/does-this-have-a-name/48061 "2022-05-31T03:39:13Z")

</div>

Not a long ago I ask why the first of parame of def named call in there. Now I have a related question, what is the name of the part of these: def a(p1,p2,p3) do … fn p1,p2,p3 -\>… catch p1,p2 → Or maybe also incld…

---

## [Type-level guards on top-level body-less function head](https://forum.elixirforum.com/t/type-level-guards-on-top-level-body-less-function-head/44187)

<div class="topic-metadata">

**Author:** [@Huolong](https://forum.elixirforum.com/u/Huolong)\
**Replies:** 2\
**Last updated:** [December 1, 2021, 6:46pm UTC](https://forum.elixirforum.com/t/type-level-guards-on-top-level-body-less-function-head/44187 "2021-12-01T18:46:50Z")

</div>

The top-level body-less function clause in a multi-head function is currently used for defining default argument values, and argument names for doc. There are two kinds of guards: Type-level guards that enforce the …

---

## [Sesterl - An ML-inspired statically-typed Erlang](https://forum.elixirforum.com/t/sesterl-an-ml-inspired-statically-typed-erlang/41658)

<div class="topic-metadata">

**Author:** [@michallepicki](https://forum.elixirforum.com/u/michallepicki)\
**Replies:** 12\
**Last updated:** [October 3, 2021, 6:28am UTC](https://forum.elixirforum.com/t/sesterl-an-ml-inspired-statically-typed-erlang/41658 "2021-10-03T06:28:44Z")

</div>

Sesterl is a language for the BEAM with syntax from the ML family of languages (Standard ML, OCaml, F#, Elm) created by Takashi Suwa (github, twitter jp, twitter en). I hope they don’t mind me sharing it here! Sesterl h…

---

## [Gleam, a statically typed language for the Erlang VM](https://forum.elixirforum.com/t/gleam-a-statically-typed-language-for-the-erlang-vm/20349)

<div class="topic-metadata">

**Author:** [@lpil](https://forum.elixirforum.com/u/lpil)\
**Replies:** 306\
**Last updated:** [May 6, 2021, 2:13pm UTC](https://forum.elixirforum.com/t/gleam-a-statically-typed-language-for-the-erlang-vm/20349 "2021-05-06T14:13:52Z")

</div>

Gleam is a statically typed language for the Erlang VM that I have been slowly building over the last year or so. I’ve had a few people ask me about it so I’m making this thread as a place to talk about it. The type sys…

---

## [The complexity of Haskell vs. Elixir's simplicity](https://forum.elixirforum.com/t/the-complexity-of-haskell-vs-elixirs-simplicity/16366)

<div class="topic-metadata">

**Author:** [@dogweather](https://forum.elixirforum.com/u/dogweather)\
**Replies:** 35\
**Last updated:** [March 12, 2021, 5:03am UTC](https://forum.elixirforum.com/t/the-complexity-of-haskell-vs-elixirs-simplicity/16366 "2021-03-12T05:03:05Z")

</div>

I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and even Ruby: it’s got a couple awesome features — strong static inferential typing plu…

---

## [2021-03-16 - Birmingham Elixir - Online - Robert Virding will be speaking!](https://forum.elixirforum.com/t/2021-03-16-birmingham-elixir-online-robert-virding-will-be-speaking/37951)

<div class="topic-metadata">

**Author:** [@knewter](https://forum.elixirforum.com/u/knewter)\
**Replies:** 0\
**Last updated:** [March 4, 2021, 2:56pm UTC](https://forum.elixirforum.com/t/2021-03-16-birmingham-elixir-online-robert-virding-will-be-speaking/37951 "2021-03-04T14:56:23Z")

</div>

Robert Virding is going to speak at the Birmingham Elixir remote meetup at 1PM CST on March 16th. I’m really excited. He’s going to talk to us about language implementation on the BEAM in some form or another, but where …

---

## [Advice for working around my \_only\_ problem with "with" expressions - accessing success results](https://forum.elixirforum.com/t/advice-for-working-around-my-only-problem-with-with-expressions-accessing-success-results/33720)

<div class="topic-metadata">

**Author:** [@slouchpie](https://forum.elixirforum.com/u/slouchpie)\
**Replies:** 13\
**Last updated:** [March 1, 2021, 2:53pm UTC](https://forum.elixirforum.com/t/advice-for-working-around-my-only-problem-with-with-expressions-accessing-success-results/33720 "2021-03-01T14:53:52Z")

</div>

Consider this code: with {:a, first\_result} \<- {:a, List.first(\["apple"\])}, {:b, b} \<- {:b, %{} |\> to\_string} do {:ok, "happy path"} else {:a, \_} -\> {:error, "this will never be a problem"} {:b, error} -\> {:…

---

## [Trying to understand when to prefer Kernel.length/1 vs Enum.count/1](https://forum.elixirforum.com/t/trying-to-understand-when-to-prefer-kernel-length-1-vs-enum-count-1/36484)

<div class="topic-metadata">

**Author:** [@zorn](https://forum.elixirforum.com/u/zorn)\
**Replies:** 3\
**Last updated:** [December 28, 2020, 9:36pm UTC](https://forum.elixirforum.com/t/trying-to-understand-when-to-prefer-kernel-length-1-vs-enum-count-1/36484 "2020-12-28T21:36:26Z")

</div>

Is Kernel.length/1 intended only for guards? I feel like I see people using length(items) in non-guard scenarios. Should I prefer it over Enum.count/1 in any general case?

---

## [Consider I'm Jose Valim and it's 2010. I have a great idea of implementing Elixir on Top of Erlang and BEAM. What do you recommend to read/study?](https://forum.elixirforum.com/t/consider-im-jose-valim-and-its-2010-i-have-a-great-idea-of-implementing-elixir-on-top-of-erlang-and-beam-what-do-you-recommend-to-read-study/34360)

<div class="topic-metadata">

**Author:** [@pillaiindu](https://forum.elixirforum.com/u/pillaiindu)\
**Replies:** 5\
**Last updated:** [September 14, 2020, 12:49pm UTC](https://forum.elixirforum.com/t/consider-im-jose-valim-and-its-2010-i-have-a-great-idea-of-implementing-elixir-on-top-of-erlang-and-beam-what-do-you-recommend-to-read-study/34360 "2020-09-14T12:49:49Z")

</div>

I’m not planning to implement a language on BEAM. I’m neither that much talented. I’m just curious. @josevalim, @lpil, @wende, what did you guys study (or have already studied) before starting to implement these languag…

---

## [PragDave: Red Alert?](https://forum.elixirforum.com/t/pragdave-red-alert/32852)

<div class="topic-metadata">

**Author:** [@AndyL](https://forum.elixirforum.com/u/AndyL)\
**Replies:** 7\
**Last updated:** [July 18, 2020, 8:46pm UTC](https://forum.elixirforum.com/t/pragdave-red-alert/32852 "2020-07-18T20:46:19Z")

</div>

In the Smart Logic podcast Dave Thomas says that for him, Elixir has lost part of it’s shine. Listen at 54:30 - (Dave Thomas on Learning How Things Work | SmartLogic) - Dave talks about his desire for a native pipeline …

---

## [Typed Elixir](https://forum.elixirforum.com/t/typed-elixir/1388)

<div class="topic-metadata">

**Author:** [@OvermindDL1](https://forum.elixirforum.com/u/OvermindDL1)\
**Replies:** 28\
**Last updated:** [July 14, 2020, 4:47pm UTC](https://forum.elixirforum.com/t/typed-elixir/1388 "2020-07-14T16:47:06Z")

</div>

Just got an idea on how we could get a strongly typed elixir ‘now’. Imagine this: import TypedElixir defmodulet TypedTest do @moduledoc false @spec hello() :: String.t def hello, do: "world" end Or whatever fo…

---

## [Why are blankspaces allowed between Module and function?](https://forum.elixirforum.com/t/why-are-blankspaces-allowed-between-module-and-function/27794)

<div class="topic-metadata">

**Author:** [@bluegene](https://forum.elixirforum.com/u/bluegene)\
**Replies:** 4\
**Last updated:** [December 27, 2019, 2:41pm UTC](https://forum.elixirforum.com/t/why-are-blankspaces-allowed-between-module-and-function/27794 "2019-12-27T14:41:39Z")

</div>

Recently after spending an hour debugging/staring at a code, I found out that one or more blankspaces are allowed when invoking a function. For example, iex(7)\> IO. puts "hello" hello :ok iex(8)\> IO. puts("hello") h…

---

## [Add configs dynamic](https://forum.elixirforum.com/t/add-configs-dynamic/23364)

<div class="topic-metadata">

**Author:** [@jackbpaiva](https://forum.elixirforum.com/u/jackbpaiva)\
**Replies:** 3\
**Last updated:** [June 24, 2019, 4:51pm UTC](https://forum.elixirforum.com/t/add-configs-dynamic/23364 "2019-06-24T16:51:05Z")

</div>

Good morning people. I am having a question about how I could do a function that would do an external access and then I would add this setting in the config.exs file. config.exs config :myapp\_web, MyappWeb.Endpoint, …

---

## [Capture containing at least one argument - CompileError](https://forum.elixirforum.com/t/capture-containing-at-least-one-argument-compileerror/22500)

<div class="topic-metadata">

**Author:** [@torimus](https://forum.elixirforum.com/u/torimus)\
**Replies:** 6\
**Last updated:** [May 19, 2019, 12:33pm UTC](https://forum.elixirforum.com/t/capture-containing-at-least-one-argument-compileerror/22500 "2019-05-19T12:33:17Z")

</div>

Hello. I’m relatively new to Elixir, but not to programming generally. In the learning process I’ve been recently struck with following inconsistency, at “capturing” an anonymous function with & operator: iex\> &(:just…

---

## [Elixir equivalent of the spread operator?](https://forum.elixirforum.com/t/elixir-equivalent-of-the-spread-operator/11947)

<div class="topic-metadata">

**Author:** [@cpackingham](https://forum.elixirforum.com/u/cpackingham)\
**Replies:** 11\
**Last updated:** [January 20, 2019, 8:51pm UTC](https://forum.elixirforum.com/t/elixir-equivalent-of-the-spread-operator/11947 "2019-01-20T20:51:10Z")

</div>

How do I use an arbitrary number of arguments in an anonymous function? Ex. in JavaScript …args Ex. in Python \*args I need to be able to take any number of arguments in and convert them into a list with an anonymous…

---

## [What would you remove from Elixir?](https://forum.elixirforum.com/t/what-would-you-remove-from-elixir/5622)

<div class="topic-metadata">

**Author:** [@mmport80](https://forum.elixirforum.com/u/mmport80)\
**Replies:** 83\
**Last updated:** [November 18, 2018, 9:17pm UTC](https://forum.elixirforum.com/t/what-would-you-remove-from-elixir/5622 "2018-11-18T21:17:36Z")

</div>

Less is more with programming languages. To that end, what one feature would you remove from Elixir? (Except for the optional Lisp-like syntax, because i kind of like that ; ))

---

## [What handles the 'call' request in Elixir's supervisor after start\_child](https://forum.elixirforum.com/t/what-handles-the-call-request-in-elixirs-supervisor-after-start-child/16238)

<div class="topic-metadata">

**Author:** [@ltsigauke](https://forum.elixirforum.com/u/ltsigauke)\
**Replies:** 3\
**Last updated:** [September 2, 2018, 7:54am UTC](https://forum.elixirforum.com/t/what-handles-the-call-request-in-elixirs-supervisor-after-start-child/16238 "2018-09-02T07:54:50Z")

</div>

I’ve been reading through the code for Elixir supervisors for my own curiosity; when start\_child is called in the code it then passes through to the function ‘call’ and that in turn does a GenServer.call with whatever ar…

---

## [Where does require look for modules?](https://forum.elixirforum.com/t/where-does-require-look-for-modules/15873)

<div class="topic-metadata">

**Author:** [@7stud](https://forum.elixirforum.com/u/7stud)\
**Replies:** 13\
**Last updated:** [August 19, 2018, 12:33pm UTC](https://forum.elixirforum.com/t/where-does-require-look-for-modules/15873 "2018-08-19T12:33:37Z")

</div>

I’m trying to use a require statement: my\_lib.exs: defmodule MyLib do require MyMath def go(), do: MyMath.calc(1, 2) end Here’s the MyMath module: my\_math.exs: defmodule MyMath do def calc(x, y), do: x+y en…

---

## [Purpose of Process.sleep(:infinity)](https://forum.elixirforum.com/t/purpose-of-process-sleep-infinity/4014)

<div class="topic-metadata">

**Author:** [@kostonstyle](https://forum.elixirforum.com/u/kostonstyle)\
**Replies:** 1\
**Last updated:** [March 7, 2017, 8:23am UTC](https://forum.elixirforum.com/t/purpose-of-process-sleep-infinity/4014 "2017-03-07T08:23:05Z")

</div>

Hi all Could someone please tell me, what is the purpose of Process.sleep(:infinity). The code is from: defmodule A do use GenStage def init(counter) do {:producer, counter} end def handle\_demand(demand,…

---

## [How do you refer to the Match Operator when reading code?](https://forum.elixirforum.com/t/how-do-you-refer-to-the-match-operator-when-reading-code/3561)

<div class="topic-metadata">

**Author:** [@AstonJ](https://forum.elixirforum.com/u/AstonJ)\
**Replies:** 24\
**Last updated:** [August 3, 2018, 12:04pm UTC](https://forum.elixirforum.com/t/how-do-you-refer-to-the-match-operator-when-reading-code/3561 "2018-08-03T12:04:18Z")

</div>

When you see code like this: name = "José" How do you read it in your mind? In Ruby I would read it as: name, is set to, José In Elixir I’m not sure whether to read it as: name, match, José or name, equals, …

---

## [Why are there different naming styles?](https://forum.elixirforum.com/t/why-are-there-different-naming-styles/14879)

<div class="topic-metadata">

**Author:** [@aethereus](https://forum.elixirforum.com/u/aethereus)\
**Replies:** 4\
**Last updated:** [June 27, 2018, 7:13am UTC](https://forum.elixirforum.com/t/why-are-there-different-naming-styles/14879 "2018-06-27T07:13:38Z")

</div>

An irrelevant question, there are function names like Integer.is\_odd, and there are function names like Enum.empty?, why the two different naming styles?

[Next page](https://forum.elixirforum.com/tag/language-implementation/514.md?match_all_tags=true&page=1&tags%5B%5D=language-implementation)
