Best of Functional ProgrammingSeptember 2024

  1. 1
    Article
    Avatar of elixirforumElixir Forum·2y

    A free, 30min Elixir Quickstart Guide

    RunElixir.com 2 is a free, online quickstart guide designed to help developers get started with Elixir in 30 minutes. Inspired by the Rust by Example book and the Gleam language tour, it offers a condensed version of Elixir documentation and high-level introductions to various Elixir topics. It aims to show what Elixir and Erlang have to offer from a high level. Feedback and topic suggestions are welcomed.

  2. 2
    Article
    Avatar of hnHacker News·2y

    What's Functional Programming All About?

    The post provides an in-depth explanation of functional programming (FP) versus imperative programming, using the analogy of a kitchen recipe to illustrate the core principles. It debunks common misconceptions about FP and demonstrates how FP focuses on data-flow rather than control-flow. The discussion highlights the benefits of FP, such as easier parallelization, better dependency tracking, and simpler debugging, while emphasizing that FP is about managing complexity through clear dependency structures.

  3. 3
    Article
    Avatar of aspnetASP.NET Blog·2y

    Why is F# code so robust and reliable?

    F# has proved to be a robust and reliable language for software development, as demonstrated by the success of the EasyCoin project by Access Softek. Key features contributing to this success include immutability by default, discriminated unions with exhaustive checks, the absence of nulls and exceptions in business logic, strict dependency order, warnings on unused expressions, typed primitives, explicit conversions, and a functional approach to concurrency. These features collectively reduce bugs and enhance code predictability and safety.

  4. 4
    Article
    Avatar of hnHacker News·2y

    Understanding the Y combinator

    The post provides an in-depth exploration of the Y combinator, beginning with an introduction to lambda calculus, and covering fixed points and fixed-point combinators. It uses examples in Scheme and JavaScript to illustrate how the Y combinator enables recursive function calls in languages that don't inherently support recursion. The content includes detailed explanations, reduction operations, and a complete implementation in Scheme.

  5. 5
    Article
    Avatar of communityCommunity Picks·2y

    Trampoline Pattern in javascript

    Recursion breaks down complex problems into smaller subproblems, but can be inefficient in terms of performance and memory. Tail recursion, where the recursive call is the final action of the function, can mitigate memory issues. Tail Recursion Optimization (TCO) enables compilers to run these functions in constant stack space. The trampoline pattern allows for TCO in languages without built-in support, transforming recursion into iteration and preventing stack overflow.

  6. 6
    Article
    Avatar of gleamGleam·2y

    Convenient code actions – Gleam

    Gleam v1.5.0 introduces several developer experience and productivity improvements. Notable changes include context-aware exhaustiveness errors, silent compilation options, the ability to run dependency modules without compiling the main code, and prettier error messages for runtime crashes. There are also enhancements in code actions, such as automatically adding missing patterns, autocompletion for variables and arguments, and useful suggestions for missing imports. Additionally, the update includes more readable documentation and inferred minimum Gleam version requirements in projects.

  7. 7
    Article
    Avatar of javarevisitedJavarevisited·2y

    The Landscape of Functional Programming in Java (Part II) — Functional Data Structures

    The post delves into implementing purely functional data structures in Java, emphasizing immutable versus unmodifiable data structures and their significance in functional programming. It explores libraries like PCollections, Vavr, Cyclops, and others, highlighting their features, benefits, and differences. The author also notes challenges in maintaining these libraries and updates on recent developments in Java's functional programming landscape.

  8. 8
    Video
    Avatar of awelixAwesome Elixir·2y

    The Secret Language Scaling WhatsApp and Discord

    Big companies like WhatsApp and Discord use Erlang and its modern counterpart, Elixir, for scaling real-time applications. Erlang's virtual machine (BEAM) and its focus on lightweight processes, message passing, and fault tolerance make it ideal for handling massive concurrency and high availability. Elixir builds on Erlang's strengths with a more modern syntax, making it easier to develop scalable, reliable apps. These companies leverage Erlang and Elixir to manage millions of users and ensure minimal downtime, showcasing the power and efficiency of these technologies.

  9. 9
    Article
    Avatar of ploehploeh blog·2y

    A Binary Tree Zipper in C#

    The post explains how to port the Zipper data structure from Haskell to C#. It focuses on using Church encoding to model sum types and discusses the implementation of a binary tree with catamorphisms. It includes detailed code examples and comparison with alternative strategies, emphasizing the navigational structures required for tree manipulation. The code enhances understanding of abstract functional programming concepts in a C# context, although it's noted that this approach may not be practical for production use.