Fluent APIs in Functional Languages (full version)

11/02/2022
by   Ori Roth, et al.
0

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. As fluent API designs typically rely on function overloading, they are hard to realize in functional programming languages. We show how to write functional fluent APIs using parametric polymorphism and type inference instead of overloading. Our designs support all regular and deterministic context-free API protocols and beyond.

READ FULL TEXT

page 1

page 10

page 11

page 12

page 14

page 16

page 18

page 24

research
09/08/2021

Study of the Subtyping Machine of Nominal Subtyping with Variance (full version)

This is a study of the computing power of the subtyping machine behind K...
research
08/14/2019

Type-Based Resource Analysis on Haskell

We propose an amortized analysis that approximates the resource usage of...
research
07/11/2023

Simple Reference Immutability for System F-sub

Reference immutability is a type based technique for taming mutation tha...
research
05/06/2022

Synchron – An API and Runtime for Embedded Systems

Programming embedded systems applications involve writing concurrent, ev...
research
11/17/2019

Countering Inconsistent Labelling by Google's Vision API for Rotated Images

Google's Vision API analyses images and provides a variety of output pre...
research
04/13/2018

An Extended Low Fat Allocator API and Applications

The primary function of memory allocators is to allocate and deallocate ...
research
03/11/2021

Classical (Co)Recursion: Programming

Our aim here is to illustrate how the benefits of structural corecursion...

Please sign up or login with your details

Forgot password? Click here to reset