Lune

OOPSLA2023Top-tier venue

Fluent APIs in Functional Languages

Ori Roth, Yossi Gil

Abstract

Fluent API is an object-oriented pattern for elegant APIs and embedded DSLs. A smart fluent API can enforce the API protocol or DSL syntax at compile time. Since fluent API implementations typically rely on overloading function names, they are hard to realize in functional programming languages. This work shows how functional fluent APIs can be implemented in the absence of name overloading, by relying on parametric polymorphism and Hindley-Milner type inference. The implementation supports fluent API protocols in the regular- and deterministic context-free language classes, and even beyond.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Builds on1

  1. Verifying correct usage of context-free API protocolsKostas Ferles, Jon Stephens, Isil DilligPOPL 2021 · 12 citations

Related papers

  1. Syntactic Implicit Parameters with Static OverloadingDaan Leijen, Tim WhitingPLDI 2026
  2. How statically-typed functional programmers write codeJustin Lubin, Sarah E. ChasinsOOPSLA 2021 · 17 citations
  3. Compositional embeddings of domain-specific languagesYaozhu Sun, Utkarsh Dhandhania, Bruno C. d. S. OliveiraOOPSLA 2022 · 4 citations
  4. Prompt-tuned Code Language Model as a Neural Knowledge Base for Type Inference in Statically-Typed Partial CodeQing Huang, Zhiqiang Yuan, Zhenchang Xing, Xiwei Xu et al.ASE 2022 · 40 citations
  5. Data flow refinement type inferenceZvonimir Pavlinovic, Yusen Su, Thomas WiesPOPL 2021 · 15 citations
Dusk over the sea between two cliffs drawn in fine vertical lines