Programming Search⌘K

Conceptcore

Multi-paradigm programming

Also called multiparadigm programming, multi-paradigm language, hybrid language, mixed paradigms, functional core imperative shell.

A multi-paradigm language supports several paradigms, such as imperative, object-oriented and functional, so that each part of a program can use the style that fits it.

Applies to
core-languages

Idea

A multi-paradigm language supports more than one programming paradigm, so a programmer can write each part of a program in the style that fits it. Most languages in wide use today are multi-paradigm: Python, JavaScript, Java, C#, C++, Kotlin, Rust, Scala and Swift all combine imperative statements, objects with dynamic dispatch, and first-class functions. Multi-paradigm programming is the practice of choosing and combining these styles inside one program, for example a pure function to compute a result, a loop to update a table, and an interface to vary the output.

from abc import ABC, abstractmethod
from dataclasses import dataclass


@dataclass(frozen=True)
class Order:  # object-oriented: a value type with named fields
    customer: str
    amount: int


def parse(line):  # functional: a pure function from text to a value
    name, amount = line.split(",")
    return Order(name.strip(), int(amount))


def totals(orders):  # imperative: a loop that updates a dictionary
    out = {}
    for o in orders:
        out[o.customer] = out.get(o.customer, 0) + o.amount
    return out


class Report(ABC):  # object-oriented: one interface, many formats
    @abstractmethod
    def line(self, name, total): ...


class Plain(Report):
    def line(self, name, total):
        return f"{name} {total}"


class Csv(Report):
    def line(self, name, total):
        return f"{name},{total}"


text = "ana, 30\nbo, 70\nana, 25\ncy, 10\nbo, 5"
orders = [parse(line) for line in text.splitlines()]
big = sorted(((n, t) for n, t in totals(orders).items() if t > 50),
             key=lambda pair: -pair[1])  # declarative: filter and sort
for report in (Plain(), Csv()):
    for name, total in big:
        print(report.line(name, total))
Output
bo 75
ana 55
bo,75
ana,55

The program uses four styles in thirty lines. Order is an immutable value, parse is a pure function, totals is a plain loop over mutable state, the comprehension and sorted state what to keep and in which order, and Report lets the same data print in two formats through dynamic dispatch. Each style does the job that it does best, and no part forces its style on the others.

How it works

A paradigm is a set of concepts. Peter Van Roy defines it this way: "A programming paradigm is an approach to programming a computer based on a mathematical theory or a coherent set of principles."1 Each paradigm rests on a few concepts: mutable state and sequence for imperative programming, objects and dispatch for object-oriented programming, functions as values and immutability for functional programming, relations and search for logic programming. A language is multi-paradigm when it gives the concepts of more than one paradigm.

Different parts need different concepts. Van Roy argues: "Solving a programming problem requires choosing the right concepts. All but the smallest toy problems require different sets of concepts for different parts."1 The Python documentation gives an example: "In a large program, different sections might be written using different approaches; the GUI might be object-oriented while the processing logic is procedural or functional, for example."2 A common modern pattern is a functional core with an imperative shell: pure functions compute the decisions, and a thin layer of imperative code reads input, writes output and holds state.

Concepts that compose. The concepts of a multi-paradigm language must work together. A lambda can capture an object, a method can return a function, a class can implement an interface for iteration, and a loop can run over the result of a pipeline. Van Roy states the goal: "A language should ideally support many concepts in a well-factored way, so that the programmer can choose the right concepts whenever they are needed without being encumbered by the others."1 Where the concepts meet badly, bugs appear, as when a closure captures a loop variable that the loop keeps changing. The wrong blocks of the Python, JavaScript and C# files show this.

Styles have a default. Even a multi-paradigm language makes one style easier than the others. Python and Go favor the imperative style, Java favors classes, Scala and F# favor functional code, and C++ leaves the choice to the programmer. Bjarne Stroustrup wrote of C++: "C++ directly supports a variety of programming styles. In this, C++ deliberately differs from languages designed to support a single way of writing programs."3 He preferred the label: "If I must apply a descriptive label, I use the phrase “multi-paradigm language” to describe C++."3

How languages became multi-paradigm. Few languages start this way. Most begin with one paradigm and add the concepts of others over time: Java and C# added lambdas, streams, records and pattern matching to a class-based core; C++ added templates, lambdas and ranges to C; JavaScript added classes, modules and async functions to a language with closures and prototypes. Each addition must fit the existing syntax and semantics, which is why the same concept looks different in each language.

In languages

LanguageVerdictNote
PythonNative
C++Native
JavaNative
CIdiom
C#Native
JavaScriptNative
TypeScriptNativeAs JavaScript, with structural types, interfaces, union types and generics that support object-oriented and functional code alike.
GoNative
RustNative
KotlinNativeClasses, interfaces, data classes, sealed classes, lambdas, extension functions and coroutines mix object-oriented, functional and concurrent styles; no example file because kotlinc is not installed on the machine that recorded the examples.
SQLNativeQueries are declarative, and the procedural extensions of the standard and of each engine add variables, loops and stored procedures.
BashIdiomBash is imperative, and its pipelines add a dataflow style; functions take text and return a status, so other styles are hard to express.
PowerShellNativeScripts are imperative, the pipeline passes .NET objects between commands, classes and script blocks give object-oriented and functional code; no example file because pwsh is not installed on the machine that recorded the examples.
HTMLDoes not applyHTML is a markup language with one declarative style.
CSSDoes not applyCSS is a declarative language of rules with one style.
Regular expressionsDoes not applyA regular expression is a pattern in one declarative notation.
Language Verdict Mechanism
Python native statements, classes, first-class functions, comprehensions
JavaScript native closures, prototypes and classes, the event loop
TypeScript native as JavaScript, with structural types
Java native classes and interfaces, lambdas, streams, records
Kotlin native classes, data and sealed classes, lambdas, coroutines
C# native classes, LINQ, records, pattern matching, async
Go native structs and implicit interfaces, closures, goroutines
Rust native traits, algebraic data types, closures, iterators
C idiom procedures; function pointers for callbacks and interfaces
C++ native procedural code, classes, templates, lambdas, ranges
Bash idiom commands and pipelines
PowerShell native scripts, an object pipeline, classes, script blocks
SQL native declarative queries with procedural extensions
Regex n/a one declarative notation
HTML n/a one declarative markup style
CSS n/a one declarative style of rules

Every core language of this site is multi-paradigm except C, Bash and the three notations that have no paradigm to choose. Each example file solves the same task, the totals of customers whose orders exceed 50, with a value type, a pure function, a loop that updates a map, a filter and sort, and an interface with two formats. The files differ in how much each style costs to write. In Python, JavaScript and C# every style is short. Java puts every function in a class. Go has no filter function and writes a loop instead. Rust makes the shared and mutable parts explicit in the types. C writes an interface as a table of function pointers by hand.

Languages also differ in which paradigm is the default and which is a guest. Scala and F# make immutable values and expressions the default and allow mutation. OCaml has objects but most code uses modules and functions. Common Lisp combines functional code, a powerful object system, and macros that add new styles to the language.

PythonGitHub
from functools import reduce

amounts = [30, 70, 25, 10, 5]


def total_loop(xs):  # procedural
    t = 0
    for x in xs:
        if x >= 10:
            t += x
    return t


def total_fn(xs):  # functional
    return reduce(lambda acc, x: acc + x, filter(lambda x: x >= 10, xs), 0)


class Till:  # object-oriented: state and behavior together
    def __init__(self):
        self.total = 0

    def ring(self, x):
        if x >= 10:
            self.total += x
        return self


till = Till()
for a in amounts:
    till.ring(a)

print(total_loop(amounts), total_fn(amounts), till.total,
      sum(x for x in amounts if x >= 10))
Output
135 135 135 135

This code runs but gives a wrong answer on purpose.

# Build three functions that should return 0, 1 and 2.
fns = []
for i in range(3):
    fns.append(lambda: i)

print([f() for f in fns])
Output
[2, 2, 2]
  • Verdict: native. Python has statements and loops, classes with inheritance and dynamic dispatch, first-class functions, comprehensions and generators, so procedural, object-oriented and functional code all look natural. The first block computes one total in four ways, the last a generator expression. Python leans toward the imperative style: lambda holds one expression, and the standard library has no persistent collections.
  • The wrong block mixes a closure with a loop variable that changes. Each lambda captures the variable i, not its value at the time, and after the loop i is 2. Bind the value when the function is made, with lambda i=i: i or functools.partial.
#include <algorithm>
#include <iostream>
#include <map>
#include <memory>
#include <sstream>
#include <string>
#include <vector>

struct Order {                                       // a value type
    std::string customer;
    int amount;
};

Order parse(const std::string& line) {               // a pure function
    std::istringstream in(line);
    Order o;
    std::getline(in, o.customer, ',');
    in >> o.amount;
    return o;
}

struct Report {                                      // an abstract class
    virtual ~Report() = default;
    virtual std::string line(const std::string& n, int t) const = 0;
};
struct Plain : Report {
    std::string line(const std::string& n, int t) const override { return n + " " + std::to_string(t); }
};
struct Csv : Report {
    std::string line(const std::string& n, int t) const override { return n + "," + std::to_string(t); }
};

int main() {
    std::istringstream text("ana, 30\nbo, 70\nana, 25\ncy, 10\nbo, 5");
    std::map<std::string, int> totals;
    for (std::string line; std::getline(text, line);) {   // an imperative loop
        Order o = parse(line);
        totals[o.customer] += o.amount;
    }
    std::vector<std::pair<std::string, int>> big;
    std::ranges::copy_if(totals, std::back_inserter(big), [](const auto& p) { return p.second > 50; });
    std::ranges::sort(big, std::ranges::greater{}, &std::pair<std::string, int>::second);  // generic

    std::vector<std::unique_ptr<Report>> reports;
    reports.push_back(std::make_unique<Plain>());
    reports.push_back(std::make_unique<Csv>());
    for (const auto& r : reports)
        for (const auto& [name, total] : big) std::cout << r->line(name, total) << "\n";
}
Output
bo 75
ana 55
bo,75
ana,55
  • Verdict: native. Stroustrup designed C++ to support several styles: C-style procedural code, classes with virtual functions, generic programming with templates, and, with lambdas and ranges, a functional style. The block uses all four. The style that a part of a C++ program uses is a choice of the programmer, and a code base usually needs rules about which styles to use where.
JavaGitHub
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Main {
    record Order(String customer, int amount) {            // a value type
        static Order parse(String line) {                  // a pure function
            String[] p = line.split(",");
            return new Order(p[0].strip(), Integer.parseInt(p[1].strip()));
        }
    }

    sealed interface Report permits Plain, Csv {           // one interface, two formats
        String line(String name, int total);
    }
    record Plain() implements Report {
        public String line(String name, int total) { return name + " " + total; }
    }
    record Csv() implements Report {
        public String line(String name, int total) { return name + "," + total; }
    }

    public static void main(String[] args) {
        String text = "ana, 30\nbo, 70\nana, 25\ncy, 10\nbo, 5";
        Map<String, Integer> totals = new HashMap<>();
        for (String line : text.split("\n")) {             // an imperative loop
            Order o = Order.parse(line);
            totals.merge(o.customer(), o.amount(), Integer::sum);
        }
        List<Map.Entry<String, Integer>> big = totals.entrySet().stream()
            .filter(e -> e.getValue() > 50)                // a functional pipeline
            .sorted(Map.Entry.<String, Integer>comparingByValue().reversed())
            .toList();
        for (Report r : List.of(new Plain(), new Csv())) {
            for (var e : big) System.out.println(r.line(e.getKey(), e.getValue()));
        }
    }
}
Output
bo 75
ana 55
bo,75
ana,55
  • Verdict: native. Java began as a class-based object-oriented language, and it has since gained lambdas, streams, records, sealed interfaces and pattern matching, which support a functional style with algebraic data types. Every function still lives in a class, so a pure function is a static method, as Order.parse is.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct order { char customer[8]; int amount; };     /* a value type */

/* An interface as a table of function pointers. */
struct report { const char *fmt; };
static void line(const struct report *r, const char *n, int t) { printf(r->fmt, n, t); }

struct total { char name[8]; int sum; };

static int by_sum_desc(const void *a, const void *b) {   /* a function as a value */
    return ((const struct total *)b)->sum - ((const struct total *)a)->sum;
}

int main(void) {
    struct order orders[] = {{"ana", 30}, {"bo", 70}, {"ana", 25}, {"cy", 10}, {"bo", 5}};
    struct total totals[5];
    int n = 0;
    for (size_t i = 0; i < sizeof orders / sizeof orders[0]; i++) {   /* procedural */
        int j = 0;
        while (j < n && strcmp(totals[j].name, orders[i].customer) != 0) j++;
        if (j == n) { strcpy(totals[n].name, orders[i].customer); totals[n++].sum = 0; }
        totals[j].sum += orders[i].amount;
    }
    qsort(totals, n, sizeof totals[0], by_sum_desc);
    const struct report reports[] = {{"%s %d\n"}, {"%s,%d\n"}};
    for (int r = 0; r < 2; r++)
        for (int j = 0; j < n; j++)
            if (totals[j].sum > 50) line(&reports[r], totals[j].name, totals[j].sum);
    return 0;
}
Output
bo 75
ana 55
bo,75
ana,55
  • Verdict: idiom. C is a procedural language. Function pointers give functions as values, as the comparator of qsort shows, and a struct of function pointers gives an interface, which is how the Linux kernel and GTK write object-oriented code. Here the two formats differ only in data, so a format string is enough. C has no closures, so a callback takes a pointer to its context as an extra argument.
using System;
using System.Collections.Generic;
using System.Linq;

string text = "ana, 30\nbo, 70\nana, 25\ncy, 10\nbo, 5";
var totals = new Dictionary<string, int>();
foreach (string line in text.Split('\n'))                 // an imperative loop
{
    Order o = Order.Parse(line);
    totals[o.Customer] = totals.GetValueOrDefault(o.Customer) + o.Amount;
}
var big = totals.Where(kv => kv.Value > 50)               // a LINQ query
                .OrderByDescending(kv => kv.Value)
                .ToList();
foreach (IReport r in new IReport[] { new Plain(), new Csv() })
    foreach (var (name, total) in big)
        Console.WriteLine(r.Line(name, total));

record Order(string Customer, int Amount)                 // a value type
{
    public static Order Parse(string line)                // a pure function
    {
        string[] p = line.Split(',');
        return new Order(p[0].Trim(), int.Parse(p[1]));
    }
}

interface IReport { string Line(string name, int total); }
class Plain : IReport { public string Line(string n, int t) => $"{n} {t}"; }
class Csv : IReport { public string Line(string n, int t) => $"{n},{t}"; }
Output
bo 75
ana 55
bo,75
ana,55

This code runs but gives a wrong answer on purpose.

using System;
using System.Collections.Generic;

// Build three functions that should return 0, 1 and 2.
var fns = new List<Func<int>>();
for (int i = 0; i < 3; i++)
{
    fns.Add(() => i);
}
foreach (var f in fns) Console.Write(f());
Console.WriteLine();
Output
333
  • Verdict: native. C# combines classes and interfaces with lambdas, LINQ, records, pattern matching, async and await, and top-level statements for procedural scripts. The first block uses a record as a value, a LINQ query, a loop that updates a dictionary, and an interface with two classes.
  • The wrong block captures the variable of a for loop, which is one variable for the whole loop, so every function returns its last value, 3. A foreach loop makes a new variable for each iteration. In a for loop, copy the value into a local inside the body: int j = i; fns.Add(() => j);.
JavaScriptGitHub
class Order {
  constructor(customer, amount) {
    this.customer = customer;
    this.amount = amount;
    Object.freeze(this); // a value: no field changes after construction
  }
}

const parse = (line) => {
  const [name, amount] = line.split(",");
  return new Order(name.trim(), Number(amount));
};

function totals(orders) {
  const out = new Map();
  for (const o of orders) out.set(o.customer, (out.get(o.customer) ?? 0) + o.amount);
  return out;
}

// Any object with a line method is a report: no class is needed.
const plain = { line: (name, total) => `${name} ${total}` };
const csv = { line: (name, total) => `${name},${total}` };

const text = "ana, 30\nbo, 70\nana, 25\ncy, 10\nbo, 5";
const big = [...totals(text.split("\n").map(parse))]
  .filter(([, total]) => total > 50)
  .sort((a, b) => b[1] - a[1]);

for (const report of [plain, csv]) {
  for (const [name, total] of big) console.log(report.line(name, total));
}
Output
bo 75
ana 55
bo,75
ana,55

This code runs but gives a wrong answer on purpose.

// Build three functions that should return 0, 1 and 2.
const fns = [];
for (var i = 0; i < 3; i++) {
  fns.push(() => i);
}
console.log(fns.map((f) => f()));
Output
[ 3, 3, 3 ]
  • Verdict: native. JavaScript has first-class functions and closures from its start, objects with prototypes, classes as a syntax over prototypes, and an event loop. The block uses a frozen class instance as a value, a pure parse, a loop over a Map, an array pipeline, and two plain objects that share a method name in place of an interface.
  • The wrong block declares the loop variable with var, so the three closures share one variable, which is 3 after the loop. let makes a new binding for each iteration and gives [ 0, 1, 2 ].
package main

import (
	"fmt"
	"sort"
	"strconv"
	"strings"
)

type Order struct { // a value type
	Customer string
	Amount   int
}

func parse(line string) Order { // a pure function
	name, amount, _ := strings.Cut(line, ",")
	n, _ := strconv.Atoi(strings.TrimSpace(amount))
	return Order{strings.TrimSpace(name), n}
}

type Report interface{ Line(name string, total int) string } // satisfied implicitly

type Plain struct{}
type Csv struct{}

func (Plain) Line(n string, t int) string { return fmt.Sprintf("%s %d", n, t) }
func (Csv) Line(n string, t int) string   { return fmt.Sprintf("%s,%d", n, t) }

func main() {
	text := "ana, 30\nbo, 70\nana, 25\ncy, 10\nbo, 5"
	totals := map[string]int{}
	for _, line := range strings.Split(text, "\n") { // an imperative loop
		o := parse(line)
		totals[o.Customer] += o.Amount
	}
	var big []string
	for name, t := range totals {
		if t > 50 {
			big = append(big, name)
		}
	}
	sort.Slice(big, func(i, j int) bool { return totals[big[i]] > totals[big[j]] }) // a closure
	for _, r := range []Report{Plain{}, Csv{}} {
		for _, name := range big {
			fmt.Println(r.Line(name, totals[name]))
		}
	}
}
Output
bo 75
ana 55
bo,75
ana,55
  • Verdict: native. Go is imperative first, with structs, methods, interfaces that types satisfy without declaring it, closures, and goroutines with channels for concurrency. It leaves out inheritance and has few functional helpers, so filtering is a loop, while sorting takes a closure. The order in which Go iterates over a map is not fixed, so the program sorts before it prints.
RustGitHub
use std::collections::HashMap;

#[derive(Debug, Clone, PartialEq)]
struct Order {                                  // a value type
    customer: String,
    amount: i32,
}

fn parse(line: &str) -> Order {                 // a pure function
    let (name, amount) = line.split_once(',').expect("a comma");
    Order { customer: name.trim().to_string(), amount: amount.trim().parse().expect("a number") }
}

trait Report {                                  // one interface, two formats
    fn line(&self, name: &str, total: i32) -> String;
}
struct Plain;
struct Csv;
impl Report for Plain {
    fn line(&self, n: &str, t: i32) -> String { format!("{n} {t}") }
}
impl Report for Csv {
    fn line(&self, n: &str, t: i32) -> String { format!("{n},{t}") }
}

fn main() {
    let text = "ana, 30\nbo, 70\nana, 25\ncy, 10\nbo, 5";
    let mut totals: HashMap<String, i32> = HashMap::new();
    for o in text.lines().map(parse) {          // a loop that mutates a map
        *totals.entry(o.customer).or_insert(0) += o.amount;
    }
    let mut big: Vec<(String, i32)> = totals.into_iter().filter(|&(_, t)| t > 50).collect();
    big.sort_by_key(|&(_, t)| std::cmp::Reverse(t));
    let reports: Vec<Box<dyn Report>> = vec![Box::new(Plain), Box::new(Csv)];
    for r in &reports {
        for (name, total) in &big {
            println!("{}", r.line(name, *total));
        }
    }
}
Output
bo 75
ana 55
bo,75
ana,55
  • Verdict: native. Rust mixes the imperative style, with mutable variables and loops, and the functional style, with algebraic data types, pattern matching, closures and iterators. Traits give interfaces with static dispatch through generics and dynamic dispatch through dyn, but there is no inheritance of data. The borrow checker makes mutation safe, so the loop that updates totals needs no copies.
  • Hybrid object-functional languages. Scala, F#, OCaml, Kotlin and Swift combine classes or modules with algebraic data types, pattern matching and immutable values.
  • Lisp and its descendants. Common Lisp, Scheme, Racket and Clojure let macros add new paradigms as libraries, so a program can define its own style. See functional programming.
  • Oz and Mozart. A research language built to support many paradigms in one coherent model, used in the textbook of Van Roy and Haridi.
  • Embedded languages. A program can host a different paradigm as a language inside it, such as SQL queries, regular expressions or a rules engine. See declarative programming.
  • Polyglot programming. A system can use several languages, each with its own paradigm, connected through processes, APIs or a shared runtime such as the JVM or .NET.
  • Functional core, imperative shell. A design rule that keeps decisions in pure functions and effects at the edges. See immutability.
  • Paradigm features in libraries. Reactive streams, actors and logic solvers come as libraries in many languages. See reactive programming and the actor model.

Pitfalls

  • Inconsistent style. When each author picks a different style for the same kind of code, readers must switch models at every file. Agree on which style to use for which part, and write the rule down.
  • Closures over changing state. A closure captures a variable, not its current value, so closures made in a loop can all see the last value. The wrong blocks in the Python, JavaScript and C# files show this.
  • Mutation inside a functional pipeline. A map or filter whose function changes shared state makes the result depend on the order and the number of calls, and breaks when the pipeline becomes lazy or parallel. Keep the functions of a pipeline pure.
  • Objects that hide shared state. Passing an object into code written in a functional style can bring hidden mutable state with it. Use immutable values at the boundary.
  • Using a style the language does not support well. Deep recursion in Python or Java can overflow the stack, because neither eliminates tail calls, and a long chain of immutable copies in a language without persistent collections costs time and memory. Choose the style the language makes cheap for code on a hot path.
  • Too many abstractions. Combining class hierarchies, generic types and higher-order functions for a small task adds layers without benefit. Use the simplest style that solves the problem.

Cost

Multi-paradigm design costs nothing at run time by itself. Each style has its own costs: a virtual call costs an indirect jump, a closure costs an allocation for its captured variables in most languages, an immutable update costs a copy or a persistent structure, and a lazy pipeline costs a small object for each stage. Compilers for C++, Rust and the JVM remove much of this cost by inlining. The main cost is for people: a language with many paradigms has more features to learn, and a team needs more rules to keep a code base readable.

History

Early languages mixed ideas from the start. Lisp, from 1958, combined functions as values with assignment and loops, and Simula 67 added classes and objects to the procedural Algol 60. Around 1990, research languages such as Leda, by Timothy Budd, set out to unite imperative, object-oriented, functional and logic programming, and Budd's 1995 book named the practice multiparadigm programming. Stroustrup described C++ as a multi-paradigm language in a 1995 paper.3 Common Lisp, standardized by ANSI in 1994, combined functional code with the Common Lisp Object System.

Peter Van Roy and Seif Haridi built the Oz language and wrote Concepts, Techniques, and Models of Computer Programming in 2004, which presents paradigms as sets of concepts that a language can combine.1 Scala, released by Martin Odersky in 2004, and F#, by Don Syme at Microsoft Research in 2005, joined objects and functional programming on the JVM and .NET. From the late 2000s, mainstream languages added functional features: C# gained LINQ and lambdas in 2007, C++ gained lambdas in 2011 and Java in 2014, and most new languages, such as Kotlin, Swift and Rust, were multi-paradigm from their first release.

References

  1. Peter Van Roy, Programming Paradigms for Dummies: What Every Programmer Should Know, 2009, section 1, Introduction
  2. Python documentation: Functional Programming HOWTO, Introduction
  3. Bjarne Stroustrup, Why C++ is not just an Object-Oriented Programming Language, OOPSLA 1995, abstract; section 4

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/HNXXA1/text.yaml