Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Regardless of language, you can structure your program as a pure, functional core and an imperative shell. All of the io happens at the boundaries, i.e. the shell, but the application itself consists of functional, side-effect-free code.

Some languages make this easier to model than others, and some make doing so in a pure style easier, eliding real-world side effects like RAM access, GPU, etc.

Once you are comfortable with this concept, functional languages make a lot more sense, if you don't get lost in symbol soup.

Edit: a simple Google search for "functional core imperative shell" brings up many writings on the concept.



Yes, this is the philosophy behind which I structure my programs. Elixir has been great for this model.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: