User-Defined Operators Including Name Binding for New Language Constructs
Kazuhiro Ichikawa (The University of Tokyo, Japan), Shigeru Chiba (The, University of Tokyo, Japan)

TL;DR
This paper introduces a module system called dsl class for user-defined operators that incorporate static name binding, enabling more expressive and type-safe language extensions.
Contribution
It proposes a novel approach to implement static name binding in user-defined operators using dsl classes, integrating name management with module and type systems.
Findings
A dsl class system for user-defined operators is developed.
The system supports static name binding with scope control.
Type system extension allows propagation of bound names.
Abstract
User-defined syntax extensions are useful to implement an embedded domain specific language (EDSL) with good code-readability. They allow EDSL authors to define domain-natural notation, which is often different from the host language syntax. Nowadays, there are several research works of powerful user-defined syntax extensions. One promising approach uses user-defined operators. A user-defined operator is a function with user-defined syntax. It can be regarded as a syntax extension implemented without macros. An advantage of user-defined operators is that an operator can be statically typed. The compiler can find type errors in the definition of an operator before the operator is used. In addition, the compiler can resolve syntactic ambiguities by using static types. However, user-defined operators are difficult to implement language constructs involving static name binding. Name binding…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
