The article explains that Java lambda expressions capture variables by value, requiring them to be effectively final, which prevents modification of the original variable and aligns with functional programming principles that avoid stateful functions.
This article explains Python higher‑order functions, showing how variables can reference functions, how function names act as variables, and how to pass functions as arguments, with step‑by‑step code examples and output screenshots to illustrate each concept.
Functions as variablesPythonfunctional programming
The article examines why truly reusable code is hard to achieve by contrasting functional programming in F# with object‑oriented programming in C# through a FizzBuzz implementation, highlighting differences in fragmentation, coupling, and flexibility that affect component reuse.
This article breaks down Java Stream usage by dissecting each line of a sample program, comparing it with equivalent non‑stream code, and illustrating how iterate, limit, map, filter, and reduce work together to produce the final result.
This article explains functional programming concepts, their importance, and how to apply them in Swift through high‑order functions, lazy evaluation, custom operators, and composable image‑filter pipelines, while also addressing common pitfalls such as nested callbacks and OCP violations.
This article explores the motivations behind React's Hooks API, contrasts it with the Class API, delves into functional programming concepts, demonstrates implementations via Mixins, HOCs, and custom hooks, and compares React Hooks to Vue's Composition API, offering deep insights for front‑end developers.
The article argues that while object‑oriented programming isn’t inherently flawed, it is often unnecessary in Python, illustrating how the same tasks can be achieved with simple data classes and pure functions, reducing code size and improving clarity.
This article explains the syntax and behavior of JavaScript's reduce method, compares it with map, forEach, filter and find, and demonstrates numerous practical patterns such as flattening arrays, counting occurrences, grouping by property, deduplication, and finding extrema, all illustrated with clear code examples.
This article explains core programming paradigms—imperative, declarative, functional, and object‑oriented—illustrating their concepts, differences, and practical JavaScript examples, while discussing features like first‑class functions, currying, composition, and OOP principles such as encapsulation, inheritance, and polymorphism.
This article provides an in‑depth exploration of programming paradigms—structured, object‑oriented, and functional—tracing their historical evolution, core design concepts, advantages, drawbacks, and how they interrelate within modern software architecture and design principles.
This article explains the difference between eager and lazy evaluation, shows when and how to use lazy initialization in Java, demonstrates Supplier‑based lazy loading, virtual proxy patterns, and stream laziness with infinite streams and prime number generation, all with concrete code examples.
The article argues that object‑oriented programming is often unnecessary in Python, demonstrates a functional‑style alternative with dataclasses and plain functions, and lists exceptions and drawbacks of OOP, encouraging a simpler, more readable codebase.
The article explores why building truly reusable components is challenging by comparing a concise functional F# implementation of FizzBuzz with a more verbose object‑oriented C# version, highlighting how language paradigms and design assumptions affect modularity, coupling, and extensibility.
The 2021 Online Scala Meetup organized by Tubi featured four technical talks covering a fully reactive ad‑serving platform built with Scala and Akka‑Streams, a pragmatic take on functional programming, Scala 3 typeclass implementation, and a Spring‑Akka microservice integration, followed by summaries and recruitment information.
The article explains JavaScript’s Functor, Applicative, and Monad abstractions—showing how map, ap, and chain (flatMap) on Box types such as Either, LazyBox, and a lazy Task can replace nested try‑catch and null checks, enable composable synchronous and asynchronous code, and support parallel execution with Task.ap.
This article explains Java's method reference feature, covering its four types, practical code examples for static methods, instance methods, constructors, and highlighting limitations compared to lambda expressions, helping developers write more readable and concise Java 8 code.
Java 8’s Stream API builds a lazy pipeline where each intermediate operation is recorded as a stage and only a terminal operation triggers a single-pass execution, using internal classes like ReferencePipeline, Slink, and Sink to efficiently combine stateless, stateful, and short‑circuiting operations.
This article introduces the core features of Google Guava—including Joiner, Splitter, CharMatcher, primitive type helpers, Multiset, immutable collections, Multimap, BiMap, Table, functional utilities like Functions and Predicates, Optional, Preconditions, and a powerful local Cache—showcasing how they simplify Java development and improve code readability, safety, and performance.
This article introduces Python’s lambda anonymous functions, explains their syntax and differences from regular functions, showcases practical one‑line examples, explores functional programming tools like map, filter, and reduce, and highlights how lambdas can reduce code size while enhancing readability.
The article summarizes a series of technical talks held in August and September covering functional programming concepts such as Lens, Continuation‑Passing Style transformation, and F‑algebra with detailed explanations, demos, and theoretical insights for developers and researchers.
This article introduces Java 8’s key functional programming features—lambda expressions, functional interfaces, and the Stream API—explaining concepts such as lazy and eager evaluation, and demonstrating common operations like filter, map, flatMap, collect, reduce, and grouping with clear code examples.
This article explains the functional differences between Java Stream's map() and flatMap() methods, demonstrates their behavior with simple and nested list examples, and clarifies how each transforms or flattens data in Java 8 streams.
This article identifies four common programming patterns—loops, conditional statements, vague variable names, and global scope—that hinder code clarity and maintainability, and shows how to replace them with higher‑order functions, data‑driven structures, purposeful naming, and encapsulation techniques.
The article summarizes a 2020 Scala online meetup, covering Akka's distributed state‑management for ad‑serving, Parsec parser combinators for arithmetic expression evaluation, AST manipulation with ANTLR, and an introduction to the functional ZIO library, while reflecting on personal takeaways.
This article explains Java 8’s Map.merge() method, demonstrating how to replace traditional looping logic with concise functional code to aggregate student scores, includes full code examples, compares it with conventional approaches, and discusses related map methods and practical use cases.
This article explains Java method references, shows how they simplify lambda expressions with practical code examples, outlines reference formats, discusses readability benefits, and provides guidance for adopting this Java 8 feature in everyday programming.
This article explains how Java 8's Stream API and lambda expressions can replace verbose loops with concise, declarative operations for filtering, sorting, mapping, and grouping collections, while also covering stream creation, intermediate and terminal operations, and advanced collectors for data analysis.
This article explains the Java 8 Optional class, demonstrates how it replaces traditional null‑checking with functional methods such as of, ofNullable, map, orElse, filter, and provides best‑practice guidelines for creating and using Optional objects to write cleaner backend code.
This article demonstrates how Java 8 streams simplify collection processing compared to Java 7 by showing code examples that filter, sort, map, and reduce dishes, explains stream concepts, intermediate and terminal operations, and provides practical usage tips for parallel processing and common stream methods.
This article extends the previous introduction to Spring MVC functional interfaces by demonstrating how to handle exceptions, apply filters, implement before/after interceptors, and achieve unified routing and error handling using functional programming style in Java.
This article explains Python closures and decorators, illustrating how closures capture free variables and how decorators can wrap functions to log calls, handle parameters, and preserve metadata, with clear code examples and step‑by‑step explanations.
On April 18, the inaugural 2020 Online Scala Meetup organized by Tubi featured four speakers who explored Scala design patterns, demonstrated ZIO STM usage, shared best practices for integrating Scala into Java codebases, and introduced Shapeless’s type-level programming, offering valuable insights for developers.
This article compiles essential readings on Python programming, covering functional programming, performance optimization, testing practices, and coding standards to help developers become proficient and write high‑quality, maintainable code.
This article explains the four most common misuses of Python lambda functions—replacing built‑in functions, assigning lambdas to variables, improper use of higher‑order functions, and overly complex expressions—and offers best‑practice recommendations to improve code readability and maintainability.
This article explains how Python’s built‑in higher‑order functions map, reduce, filter, and sorted work, providing clear examples that demonstrate applying functions to iterables, accumulating results, filtering sequences, and customizing sorting with key and reverse options.
This article introduces Java 8's Stream API, explains why functional streams improve code readability and performance, and provides detailed examples of common operations such as filter, map, flatMap, reduce, collect, Optional handling, parallel processing, and debugging techniques for efficient data processing.
An overview of five emerging programming languages—Elm, Kotlin, Rust, Elixir, and Crystal—highlighting their key features, advantages, and potential impact on software development, illustrating how they address modern development needs and may shape the future of the industry.
emerging languagesfunctional programmingprogramming languages
This tutorial explains how Java 8's Stream API's map and flatMap operations work, showing practical examples of extracting student ages from collections and demonstrating why flatMap is needed to flatten nested lists, with clear code snippets and diagrams.
The November 3 Scala Meetup featured senior expert Deng Caoyuan’s whiteboard brainstorming and Tencent engineer Qu Guodong’s Cats tutorial, followed by a deep dive into Akka with real‑world examples such as a financial computing platform, real‑time article recommendation, web crawling, streaming, and practical tips for Scala developers.
The article treats functions as pure data‑to‑data mappings and demonstrates how common mathematical operations such as factorial, exponentiation, and Fibonacci can be expressed in TypeScript/JavaScript using recursive, tail‑recursive, iterative, and logarithmic‑time algorithms that illustrate functional transformation techniques and efficient algorithm design.
The article demonstrates how to write high‑quality JavaScript functions by applying functional‑programming concepts such as composition, higher‑order functions, immutability, declarative array methods, reusable utilities like a curried tap, and memoization, showing refactored examples that replace hard‑coded DOM manipulation and imperative loops with clean, reusable code.
This article introduces programming paradigms—object‑oriented, procedural, functional, and imperative—explaining their definitions, underlying philosophies, and how each can be used to implement a simple calculator, while comparing their advantages and illustrating their conceptual relationships.
This article introduces Java 8's Stream API, explains core concepts like streams, sources, and aggregation operations, and demonstrates common methods such as filter, map, limit, count, sorted, skip, and collect with practical code examples that build hierarchical permission trees.
This article introduces Java 8’s Stream API, explaining its purpose, key characteristics, how to create streams from collections or directly, and demonstrating common intermediate operations such as filter, map, limit, sorted, distinct, as well as terminal operations like forEach, count, and collect, with code examples.
Object-oriented programming, once hailed as the pinnacle of software design, is criticized for its complexity, mutable state, and poor testability, while functional programming offers simpler, more reliable code through immutability and pure functions, prompting a call to abandon OOP in favor of functional paradigms.
Over the past decade, Erlang has evolved from a niche functional language into a robust platform with powerful concurrency, fault tolerance, and a rich ecosystem, illustrated by its key applications, knowledge ladder, recent improvements, and future prospects for both Erlang and its Elixir community.
This article explores Vue 3's function‑based reactivity API, demonstrates how to implement a lightweight, framework‑agnostic reactivity library with watchable objects, functional combinators, and immutable updates, and shows practical examples such as a reactive counter, a todo list, immer‑style state handling, RxJS‑style pipelines, and React‑hooks‑style utilities, while discussing the underlying concepts and limitations.
This tutorial explores why the .reduce() method feels intimidating, demonstrates its basic usage with addition and multiplication, and then showcases five unconventional applications—including converting arrays to objects, flattening nested arrays, performing dual calculations in a single pass, merging map and filter, and sequencing asynchronous calls—while providing clear code examples and performance considerations.
This article demonstrates how to apply functional programming concepts in JavaScript by refactoring an example that reads user data from an API, filters active SREs, and formats output, illustrating the benefits of pure functions, higher‑order utilities like map, filter, reduce, and improved code readability and maintainability.
This article introduces Java 8's Stream API, explains why functional streams improve code readability and performance, and walks through core operations such as filter, map, flatMap, reduce, collect, Optional handling, concurrency, and debugging techniques with clear examples and illustrations.
This article explains Scala extractors, showing how the apply and unapply methods work, provides code examples for email address extraction, and demonstrates their use in pattern‑matching scenarios.
This article explains Scala's powerful pattern matching mechanism, demonstrates matching on integers, strings, and types with code examples, compares it to Java's switch, and introduces case classes as special classes optimized for pattern matching, highlighting their automatically generated methods and usage.
This article provides a concise overview of Scala for beginners, covering its multi‑paradigm nature, object‑oriented and functional features, powerful static type system, extensibility mechanisms, and seamless Java interoperability, laying a foundation for later Spark learning.
This article explains what higher‑order functions are, why JavaScript supports functional programming, demonstrates built‑in methods like map, filter and reduce with code examples, and shows how to create your own higher‑order function for clearer, more concise code.
Pure functions are deterministic, side‑effect‑free routines that always return the same output for identical inputs, and this article explains their definition, observable side effects, practical JavaScript examples of pure and impure functions, and why they improve testability, refactoring, and code quality in modern front‑end development.
Using map and filter instead of forEach when creating new arrays in JavaScript offers semantic separation, easier testing, better readability, and async compatibility, making code more functional and maintainable while avoiding side‑effects and unnecessary complexity.
The article explains Haskell‑style lazy lists, shows why lazy evaluation is useful, and walks through implementing lazy lists in JavaScript using custom classes, the ES6 iterable protocol, and generator functions, providing examples such as repeat, cycle, iterate, range and lazy operators like map, filter, take, and zip.
On September 15, Youzan’s big-data team and NetEase YouShu hosted a technical sharing titled “The Road to Data-Driven Operations,” where speakers explored the evolution of Youzan’s data warehouse metadata system, the architecture of its big-data development platform, and the application of functional programming in visual data analysis, highlighting current trends and future directions.
This article explains the differences between map, flatMap, and compactMap in Swift, covering the three overloads of flatMap, their behavior with sequences and optionals, the rationale behind renaming one overload to compactMap, and when to prefer optional chaining versus optional mapping.
This article presents a comprehensive guide to writing clean, maintainable JavaScript by avoiding legacy pitfalls, applying Clean Code principles, leveraging ES6/ES7 features, and using tools like Babel, ESLint, and Prettier to improve code quality and development efficiency.
By using abstraction to model common concepts and composition to build complex behavior from simple, pure‑function building blocks like map, filter, and reduce, the article shows how functional programming techniques underpin Redux and React, providing a systematic way to tame front‑end software complexity.
This article introduces the Chinese translation of "Functional Light JavaScript," explaining the book’s focus on lightweight functional programming concepts in JavaScript, the author’s journey, the core philosophy, a detailed table of contents, and where to find the open‑source translation.
This article adapts William Strunk Jr.'s timeless seven writing principles to JavaScript development, showing how functions that do one thing, minimal code, active voice, logical grouping, avoiding spaghetti, feature‑based file organization, and true‑value naming can produce cleaner, more maintainable front‑end code.
This article explores Kotlin's rise as a first‑class Android language, highlighting its concise syntax, null‑safety, extension functions, functional programming features, seamless Java interoperability, performance parity, and practical tips for teams transitioning from Java to Kotlin.
JavaScript functional programming, once a niche topic, has surged in popularity since ES6, and this article explores practical implementations—showcasing functional code versus traditional approaches, benefits like clearer semantics and reusability, common models such as closures, higher‑order functions, currying, and composition, plus optimization techniques.
Over the course of a week, the author explores Elixir’s design and features—covering its pipe operator, sigils, macro quoting, version handling, and differences from Erlang—while reflecting on language ergonomics, code readability, and functional programming concepts illustrated with concrete code examples.
Discover the core concepts of functional programming for JavaScript developers—including pure functions, function composition, currying, monads, functors, immutability, lazy evaluation, and Clojure-inspired patterns—through a concise, practical guide that bridges theory and real-world application.
This guide summarizes key resources on functional programming, performance optimization, testing strategies, and coding standards, showing how mastering these four areas can transform any Python programmer into a highly effective and sought‑after developer.
This article explains what currying is, its advantages, and provides a generic JavaScript currying function, demonstrating how to transform multi‑parameter functions into single‑parameter chains to improve code reuse, enable lazy evaluation, and enhance overall code quality in functional programming.
This article explains the distinct concepts of lambdas and closures, illustrates how Java historically handled closures, shows Python lambda behavior, and discusses the implications of variable capture and finality in Java 8 lambda expressions.
This article explains how replacing traditional for‑loops with JavaScript’s map method leads to more declarative, readable code, reduces boilerplate, improves maintainability, and offers comparable performance, while also discussing functional programming principles, browser support, and best practices for naming helper functions.
This article introduces Erlang as a general‑purpose concurrent language, highlighting its fault‑tolerant runtime, simple 550‑line syntax, pattern‑matching capabilities, process creation with spawn, and practical examples using the ibrowse HTTP library to demonstrate message passing and distributed computing.
After 15 years in software, the author reflects on JavaScript’s transformation from a simple validation script in the early 2000s to a pivotal language powering both front‑end interfaces and back‑end services, highlighting functional programming, ecosystem growth, and the market forces that drove its rise.
Eric Merritt explains how Erlang’s BEAM VM differs from other VMs with its actor‑based, per‑process garbage collection and efficient asynchronous I/O, discusses the motivations behind Joxa, offers a balanced view on Elixir, explores language laziness, type‑system considerations, and mentions emerging technologies like micro‑kernels and Nix.
In this interview, Erlang VM veteran Eric Merritt explains how BEAM’s actor‑based garbage collection, built‑in asynchronous I/O, and design choices differentiate it from other VMs, while also discussing the motivations behind Joxa, his views on Elixir, laziness, type systems, and emerging technologies he follows.
This article explains how to use Guava’s functional programming features in Java, covering Functions and Predicates, providing code examples, discussing potential pitfalls such as overly verbose anonymous classes, and offering guidance on when to prefer functional versus imperative approaches.
The article compares static and dynamic typing, functional programming, garbage collection, and virtual machines, then advises developers to focus on versatile, future‑proof languages such as JavaScript/HTML5/CSS3, C#, Java, PHP, Swift, and optionally Erlang, emphasizing deep mastery over fleeting trends.
Language Selectionfunctional programminggarbage collection
After years of using Ruby, I discovered that Clojure’s carefully designed, concise, and functional nature not only makes prototyping feel natural but also provides instant feedback and encourages thoughtful refactoring, turning development into a smooth, enjoyable flow that has quickly become my favorite language.