A4 Refereed article in a conference publication
Optimal Language Design is Hard: A Case Study in ECMAScript (JavaScript) Standardization
Authors: Riemer, Philipp; Nikulin, Yury; Claymore, Ashley; Barash, Mikhail
Editors: N/A
Conference name: International Conference on Software Language Engineering
Publisher: ACM
Publication year: 2025
Book title : SLE '25: Proceedings of the 18th ACM SIGPLAN International Conference on Software Language Engineering
First page : 84
Last page: 97
ISBN: 979-8-4007-1884-7
DOI: https://doi.org/10.1145/3732771.3742715
Web address : https://doi.org/10.1145/3732771.3742715
Self-archived copy’s web address: https://research.utu.fi/converis/portal/detail/Publication/498914057
In addition to requirements of a purely technical nature, the evolution of widely adopted programming languages is often governed by preferences of individual members---either persons or organizations---of the language maintenance team, who may associate issues with particular design aspects. For example, when adding a new primitive data type to a language, language designers may suggest alternative semantics for equality to existing data types, as well as explicitly specify issues they wish to avoid (such as inconsistent behavior among number-like types). The decision-making process can span over multiple years and can be highly unstructured, and in a dynamic and distributed language design team, the cumulated understanding of previously discussed design alternatives can thus be lost over time.
In this paper, we present a domain-specific language to specify a certain kind of language evolution proposals--- where the design space can be presented as a collection of interconnected individual design points. With each design point, one can associate a set of issues it could raise that should be avoided. From a DSL specification, an interactive web-based tool is generated that allows exploring the design space of a proposal.
Further assigning weights to issues, we formulate an optimization problem where the goal is to select alternatives for individual design points to minimize the total weight of occurring issues. We prove that this optimization problem is NP-hard. We reduce this problem to an integer linear programming problem and incorporate a solver into our interactive tool. We demonstrate the feasibility of our approach by using our DSL to specify the ECMAScript proposal Records & Tuples, and demonstrate that any design choice---as described in the proposal---will necessarily raise issues.
Downloadable publication This is an electronic reprint of the original article. |
Funding information in the publication:
M.B. acknowledges financial support from L. Meltzers Universitetsstiftelse.