PharoJS: Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6 - Pharo
Conference Papers Year : 2023

PharoJS: Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6

Abstract

PharoJS is an open source infrastructure (framework + middleware + tools) that allows developing and testing in Pharo Smalltalk, applications which ultimately run on a JavaScript (JS) interpreter. Historically, and up to Pharo version 9, PharoJS generated JS code following the ECMAScript 5 (ES5) standard. Since, ES5 has no explicit support for classes, PharoJS transpiler had to generate JS code that mimicked the Pharo class structures, behaviors and hierachies. After migrating PharoJS to Pharo version 10, we decided to adopt the ECMAScript 6 (ES6) standard. One of the major features provided by ES6 is a set of new constructs to explicitly support class-based programming. In this paper, we describe the changes we have made to PharoJS to switch from ES5 of ES6. We describe the consequences of adopting ES6 on generated code, and the positive impact on all peformance metrics.
Fichier principal
Vignette du fichier
2023-08-IWST-PharoJsES5vsES6Paper.pdf (689.79 Ko) Télécharger le fichier
Origin Files produced by the author(s)

Dates and versions

hal-04194673 , version 1 (04-09-2023)
hal-04194673 , version 2 (23-11-2023)

Licence

Identifiers

  • HAL Id : hal-04194673 , version 2

Cite

Noury Bouraqadi, Dave Mason. PharoJS: Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6. IWST 2023: International Workshop on Smalltalk Technologies, ESUG, European Smalltalk Users Group, Aug 2023, Lyon, France. ⟨hal-04194673v2⟩
47 View
84 Download

Share

More