PharoJS: Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6 - Archive ouverte HAL
Communication Dans Un Congrès Année : 2023

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

Résumé

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
pharojsIWST2023.pdf (689.79 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

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

Licence

Identifiants

  • HAL Id : hal-04194673 , version 1

Citer

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-04194673v1⟩
44 Consultations
82 Téléchargements

Partager

More