[ $davids.sh ] — david shekunts blog

🎉 Functional Oriented Programming (FOP) has been officially released! And I need your help

# [ $davids.sh ] · message #170

🎉 Functional Oriented Programming (FOP) has been officially released! And I need your help

https://fop.davidshekunts.ru

After 2 years of writing, my book on FOP has reached v1.0 🎉

This is still far from the end, I have several more sections planned (about Cohesion vs Coupling, Error Handling, etc.), as well as recording a few video tutorials and starting to speak at conferences about FOP.

The v1.0 release was marked by @cyberJohnny posting about my book in a bunch of his public channels for free, thank you very much, @cyberJohnny!

If you're interested, here are the links to the channels: 1, 2, 3, 4, 5** I need your help!

**Firstly, a huge help would be comments and criticism of what's written in the book. I really believe in what I've written and have been using it for many years. BUT only through discussing the ideas in the book can I make them better in any way. So, any questions and thoughts are welcome!

Secondly, I would like to start spreading it somehow, but I'm extremely bad at marketing... I don't know what to do with it and how to start promoting it more actively. So, if you liked the material and you can post it on your blog or recommend it to someone, or recommend a public channel where I can post, I'll be very grateful!

P.S.

I also made an ad for the blog and it brought +53 new subscribers to the channel, welcome, friends 😍

  • @ Aleksei Bulaev · # 497

    I stopped exploring the resource after I couldn't figure out the entire link structure. A book that tries its best not to be one. Good luck with your promotion.

  • @ [ $davids.sh ] · # 498

    Oh, that's an interesting point.

    So, you're writing: "I don't understand and find the link structure inconvenient" - correct? If so, what is most inconvenient?

    I agree that I neglected the "next / previous section" buttons; I'll add those. Anything else?

  • @ Aleksei Bulaev · # 499

    I expected to see a book with a structure (a table of contents at least), but instead, there's a set of links, some of which are hidden. The description of the data structure (Data) - here implementation examples are hidden, but then there are links to sections of the book: Disclaimer about TypeScript -> you will learn about it in the "Programming Languages" section. Should I start reading the book from here? Or is there something before this? What comes after this section?

  • @ [ $davids.sh ] · # 500

    Good points, thank you!

    Then I'll do the following:

    . Add a table of contents . Number the sections and chapters . Get rid of unnecessary links . Create convenient buttons to navigate from chapter to chapter

    Maybe something else will come to mind along the way

  • @ Aleksei Bulaev · # 501

    Yes, thank you very much

  • @ Valeriy ITK 🚀 · # 502

    Got myself a birthday present

  • @ Vladimir Sva · # 503

    Started reading your book when it was still a series of blog posts. Seems like 2 years have passed 🤔 Periodically checked for updates.

    For that first series of articles, the link structure was clear. For the book, the format is still not very convenient.

    In my free time, I'll reread the latest version and possibly criticize/comment on the substance.

  • @ Igor IT-K Malinkin · # 506

    Congratulations 🤝

  • @ Artur G · # 507

    I recently familiarized myself with the content. Thank you for popularizing FP! I found some useful patterns for myself.

    I have some criticism.

    Why does FP need to be called FOP?

    The thesis "Data and behavior (functions) exist separately from each other, and any function can use any data" can be attributed to FP.

    In the "FOP vs FP" section:

    1. Point "Low entry barrier". Monads, etc., are not particularly necessary in FP either. They are optional to reduce boilerplate code. In my opinion, the entry barrier is higher due to the lack of documentation with examples for libraries.
    2. Then similarities just follow. 😁

    Okay, it's a methodology, not a paradigm, but why then put it against FP? 🙃

  • @ [ $davids.sh ] · # 508

    Great question!

    Were you able to read the chapter https://fop.davidshekunts.ru/origins/why-fp-and-pp-is-not-a-solution?

    If you still have questions after that, I'll write another article from a slightly different perspective.

  • @ Artur G · # 509

    Read it. I don't understand why FOP ≠ FP. 🙂

    Mutable state can also be used in FP. Monads, again, are optional.

  • @ [ $davids.sh ] · # 510

    Then there are 2 points here:

    1. If we consider the statement that mutable state is normal in FP, then FOP is a structural description of FP principles (which overlap with Procedural Programming), composed according to the structure of OOP descriptions (philosophy, pillars, patterns). FOP is an observation of FP, PP, and (Anemic) OOP code, which I structurally described in one book because I couldn't find anything similar anywhere.

    2. But in my personal opinion, FP without statelessness (i.e., with mutations) cannot be called FP. In fact, it will turn out to be PP with FP mechanics (which, by the way, is what FOP describes), or else multi-paradigm if the FP language was created on top of OOP languages/interpreters (ReScript, Scala, F#, etc.).

    The whole beauty of FP is determinism, safe and easy parallelism of computations, and isolation of each function*, which is only possible thanks to statelessness, and therefore thanks to special language/interpreter constructs (Haskell, Erlang, Elixir, etc.). And it is statelessness that makes the use of monads and similar things mandatory.

    All examples of functional languages or libraries for non-canonically functional languages provide expressive tools for writing FP-like code, but they do not provide the most important thing that FP offers.

    * – the isolation of functions is best seen in the example of the Erlang VM, which takes your application and deploys each individual function as a "mini-application". On the next deployment, the VM understands which functions have changed, cuts off traffic from the old ones, and launches the new ones. This is how Ericsson (the creators of Erlang) achieved 99.999% uptime.

  • @ Artur G · # 513

    Okay. Now it's clear that for FOP it's important to have only mutability and no complex abstract structures (monads). If considered alongside pure FP.

  • @ [ $davids.sh ] · # 514

    I would say: for FOP, immutability is an option that carries both advantages and disadvantages, so FOP remains fully functional and completely mutable.

    And monads and the like, that's if the whole team really wants it) That is, yes, they can be completely omitted when using FOP.

  • @ [ $davids.sh ] · # 515

    At the same time: if I were using a canonical FP language, I wouldn't focus on FOP (I would use a strict FP design), and if I were using an OOP language, I would write according to FOP (because FOP can easily be used in a fully OOP language).

  • @ Nikita · # 521

    When will the book be fully released with examples?

  • @ [ $davids.sh ] · # 525

    Towards the end of the year, I'll have quite a bit of free time, and I plan to build 2 examples of functional programming services for TypeScript and Golang.

    There will be code + a set of articles + possibly a video series on how I'm building all of this.

    I think this will be the most illustrative way to demonstrate the advantages of FP.

    If you have any cool examples demonstrating the capabilities of FP, PP (declarative programming), or OOP, I'd be grateful for links so I can potentially write the same thing, but in FP.

  • @ Nikita · # 526

    Sounds cool, but does Go have good FP support? I'd like to see Rust and Python.

  • @ [ $davids.sh ] · # 527

    In FOP, all FP tricks are optional, so FOP is much closer to Procedural Programming than to FP, and Go is precisely procedural, so FOP feels perfectly at home there)

    The only thing really missing in Go is pattern matching, so that all FOP tricks can be used in it.

    Regarding Rust, FOP experience from TS and Go can be fully applied to it (because the use of FOP does not intersect with Rust's differences from these languages, for example, in matters of memory and concurrency management).

    However, for Python, some tricks will have to be used: since it lacks types/interfaces, you need to use classes, for pattern matching you also need workarounds, and branded types are likely unavailable there, and so on.