Source (programming language)

Source is a family of sublanguages of JavaScript, developed for the textbook Structure and Interpretation of Computer Programs, JavaScript Adaptation (SICP JS). The JavaScript sublanguages Source §1, Source §2, Source §3 and Source §4 are designed to be just powerful enough to support all examples of the respective chapter of the textbook.

source
ParadigmMulti-paradigm: scripting, imperative, procedural, functional
First appeared2017 (2017)
Stable release
2021 (Knight) / 17 July 2020 (2020-07-17)
Typing disciplineDynamic, duck
OSbrowser-based
LicenseApache License
Filename extensions.js
Websitesource-academy.github.io/source/
Major implementations
Safari (Safari's JavaScript is properly tail recursive), Source Academy
Dialects
Source §1, Source §2, Source §3, Source §4
Influenced by
JavaScript, Scheme

Purpose and design principle

During the development of SICP JS, starting in 2008, it became clear that purpose-designed sublanguages of JavaScript would contribute to the learning experience. Initially called "JediScript" and inspired by JavaScript: The Good Parts., Douglas Crockford, the Source sublanguages follow the chapters of SICP JS; each language Source §x is a sublanguage of the next language Source §(x+1).

Features

Source §1 is a very small purely functional sublanguage of JavaScript, designed for Chapter 1 of SICP JS. Source §2 adds pairs and a list library, following the data structures theme of Chapter 2. Source §3 adds state-full constructs, and Source §4 adds support for meta-circular evaluation. Chapter 5 of SICP JS does not require language support beyond Source §4. All Source languages are properly tail recursive, as required by Chapter 1 of SICP and as specified by ECMAScript 2016.

Implementations

Since the Safari browser is ECMAScript 2016 compliant, including proper tail calls, it can serve as an implementation of all Source languages, provided that the necessary libraries are loaded. The Source Academy[1] is a web-based programming environment that implements all Source languages, regardless of browser support for proper tail calls, and features various tools for the readers of SICP JS. The language implementation in the Source Academy is an open-source project.[2]

gollark: ···
gollark: https://www.redblobgames.com/grids/hexagons/It's very well-written and understandable.
gollark: A little. I read some stuff on hexgrid maps and algorithms for games.
gollark: I only do hexagons.
gollark: Sad.

References

  1. "Source Academy". NUS. 2019. Retrieved 23 December 2019.
  2. "js-slang on github". NUS. 2020. Retrieved 17 July 2020.

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.