Recent submissions

Comment · 6 years ago
> Hi, I'm a seasoned erlanger, and we do not all tell you that.

Seasoned Erlang developer here too (10+ years).

First of all, the original post wanted to share data across requests. Given each request is typically handled in separate process, you simply cannot use the process dictionary to share this data. So your original comment completely missed the mark.

Second of all, I would say most of the Erlang community actually agrees with the Erlang official documentation linked above. For example, for a long time, Cowboy had this in its README:

> No parameterized module. No process dictionary. Clean Erlang code.

And the reason is simple: the process dictionary is about state within a single process. This data cannot be easily shared (you can with erlang:process_info/2 but that adds a process lock). Therefore, most times people resort to the process dictionary is to pass data within a process, implicitly, and passing it functionally (the clean way) is often better. Using ets for the same purpose would also be frowned upon. The process dictionary should only be used almost exclusively for metadata.

You probably won't be inclined to take my word for this, so here is a proposal: send a pull request to remove or update the linked notes above from Erlang/OTP docs and see how well it will be received.

Comment · 6 years ago
Can we also submit it via HN? If so, my understanding is that Pagerduty is running and long-term invested in Elixir (https://www.pagerduty.com/blog/elixir-at-pagerduty/) and Podium has migrated from Ruby to Elixir as the main stack (https://medium.com/podium-engineering/two-years-of-elixir-at...). Thanks!

Edit: oops, I see now it is the initial language. Indeed PagerDuty started using Elixir only later on. Although one could argue Elixir was part of Podium in its initial growth.

Comment · 6 years ago
Sure, my comment was specific to functional languages, and Python isn’t one.
Comment · 6 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton