We present the first general and practical solution of the fluent API problem - an algorithm, that given a deterministic language (equivalently, LR(k), k >= 0 language) encodes it in an unbounded parametric polymorphism type system employing only a polynomial number of types. The theoretical result is accompanied by an actual tool Fling - a fluent API compiler-compiler in the venue of YACC, tailored for embedding DSLs in Java.
@InProceedings{gil_et_al:LIPIcs.ECOOP.2019.13, author = {Gil, Yossi and Roth, Ori}, title = {{Fling - A Fluent API Generator}}, booktitle = {33rd European Conference on Object-Oriented Programming (ECOOP 2019)}, pages = {13:1--13:25}, series = {Leibniz International Proceedings in Informatics (LIPIcs)}, ISBN = {978-3-95977-111-5}, ISSN = {1868-8969}, year = {2019}, volume = {134}, editor = {Donaldson, Alastair F.}, publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik}, address = {Dagstuhl, Germany}, URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ECOOP.2019.13}, URN = {urn:nbn:de:0030-drops-108053}, doi = {10.4230/LIPIcs.ECOOP.2019.13}, annote = {Keywords: fluent API, type system, compilation, code generation} }
Feedback for Dagstuhl Publishing