https://github.com/waiting-for-dev/elixir_state
Trying to understand how state is managed in a functional language like Elixir
https://github.com/waiting-for-dev/elixir_state
Last synced: about 2 months ago
JSON representation
Trying to understand how state is managed in a functional language like Elixir
- Host: GitHub
- URL: https://github.com/waiting-for-dev/elixir_state
- Owner: waiting-for-dev
- Created: 2016-08-11T17:56:57.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-11T17:59:05.000Z (almost 10 years ago)
- Last Synced: 2025-03-04T11:43:24.247Z (over 1 year ago)
- Language: Elixir
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bucket
This is me, after years with an Object Oriented mindset, trying to understand how state is managed in a functional language like Elixir.
In the `lib` directory, there are several implementations of a `Bucket` module. It just wraps a dictionary and cat get and put elements on it by key, or consult the current state (dictionary). Completely useless, just a very simple example where state has to be kept. My personal notes are tangled between the code.
The order in which the files should be read is:
* functional
* server
* one_server
* generic_server
* gen_server
* agent
Sorry if something is wrong. Please, tell me if you know. This is not very clean nor 100% polished at all, they are just notes I needed and that I want to share just in case somebody is in the same point. If so and you want to discuss about something I'll be happy to learn together.
I needed to order these ideas while reading the great, great book [Elixir in Action](https://www.manning.com/books/elixir-in-action) by [Saša Jurić](http://www.theerlangelist.com/).