cid d2c69c3f7c9ec873dfb5b609445f23f1b66f1ab71ff3249f01221a0ee4140741 · original · open access · via openalex
Title: GoNext: Transpiler and Reproducibility Package (v1.0.0) Authors: Dmytro Prokopovych-Tkachenko Venue: Zenodo (CERN European Organization for Nuclear Research) Year: 2026 Canonical: doi:10.5281/zenodo.23490819 URL: https://doi.org/10.5281/zenodo.23490819 Collector: openalex OA: true ABSTRACT GoNext is an experimental dialect of the Go programming language and a source-to-source transpiler that adds high-level language extensions while keeping full compatibility with the Go compiler, runtime and ecosystem. Every valid Go program is a valid GoNext program with unchanged meaning. The generated code is ordinary Go: it is compiled, tested, vetted and packaged by the unmodified Go toolchain, and GoNext and Go files can coexist in one package. The transpiler runs in six stages: parsing, an internal abstract syntax tree, partial semantic analysis based on go/types, normalization, lowering to go/ast, and emission with //line directives. Thanks to these directives, compiler errors, panics and stack traces refer to GoNext source lines. The transpiler implements eight extensions: - enum types with associated data; - pattern matching (match) with guards, alternatives and exhaustiveness checking; - named arguments; - default parameter values; - extension methods; - generic methods; - short anonymous functions with contextual type inference; - uniform function call syntax. Enums can be lowered to three representations: a sealed interface, a flat tagged struct, or a compact tagged struct. The compact representation keeps pointer payloads visible to Go's precise garbage collector. The archive also contains the reproducibility package of the accompanying article "GoNext: A Transpilation Architecture for Language Extensions with Go Ecosystem Compatibility": - the Go packages of the four micro-experiments (enum representations, named and default arguments, generic and extension methods, pointer visibility for the garbage collector); - the criterion scores of the host-platform assessment and the Dirichlet sensitivity analysis; - raw benchmark output and a description of the measurement environment; - the scripts that compute all reported statistics and regenerate the figures. Quality gates: golden tests, gofmt / go vet / type-checker acceptance of all generated code, differential tests under all enum representations, and diagnostics tests. Requirements: Go 1.24 or newer. The analysis scripts additionally need Python 3 with NumPy and Matplotlib. Reproduce all results: bash scripts/reproduce.sh License: Apache-2.0