Generated by DeepSeek V3.2| Snap! (programming language) | |
|---|---|
| Name | Snap! |
| Paradigm | Event-driven programming, Visual programming language |
| Designer | Jens Mönig, Brian Harvey |
| Developer | University of California, Berkeley |
| Latest release version | 9.0 |
| Latest release date | 2024 |
| Typing | Dynamic typing |
| Influenced by | Scratch (programming language), Scheme (programming language), Smalltalk |
| Operating system | Cross-platform |
| License | GNU Affero General Public License |
Snap! (programming language). Snap! is a free, browser-based, visual programming language designed to introduce core computer science concepts. Developed as an extended reimplementation of Scratch (programming language), it adds support for first-class procedures, objects, and lambda expressions. The language is widely used in educational settings, from middle schools to university courses, and is maintained by researchers at the University of California, Berkeley.
Snap! presents a dynamic, block-based interface where users construct scripts by snapping together graphical command blocks, eliminating syntax errors common in text-based languages. Its environment runs directly in a web browser without requiring installation, built using JavaScript and HTML5. While its visual metaphor is inspired by the MIT Media Lab's Scratch (programming language), Snap! is distinguished by its incorporation of advanced ideas from functional programming and its use in teaching courses like The Beauty and Joy of Computing. The project is led by Brian Harvey and Jens Mönig, with ongoing support from the National Science Foundation.
A key feature is its treatment of procedures as first-class entities, allowing them to be passed as arguments, returned as values, and stored in data structures, a concept central to Scheme (programming language). It supports nested sprites, prototype-based programming for object creation, and user-defined Control flow structures. The language includes advanced list operations, XML parsing capabilities, and tools for concurrency like the Message passing model. Its pen extension allows for intricate Turtle graphics, and it can interface with external hardware like the LEGO Mindstorms robotics kit.
The project originated around 2011 as "BYOB" (Build Your Own Blocks), created by Jens Mönig as an extension of the Scratch 1.4 codebase. It was later renamed Snap! and rewritten from scratch in JavaScript to operate independently. Major development has been centered at the University of California, Berkeley, within the context of the The Beauty and Joy of Computing curriculum. Influences are drawn from Alan Kay's work on Smalltalk, the Lisp (programming language) family, and the Logo (programming language) tradition. Funding has been provided by the National Science Foundation and collaborations with entities like the European Commission.
Snap! is the primary programming environment for the Advanced Placement course "Computer Science Principles" in many schools, particularly through the The Beauty and Joy of Computing curriculum developed at University of California, Berkeley. It is used to teach algorithmic thinking, abstraction (computer science), and data science concepts at institutions ranging from the Harvey Mudd College to the University of Cambridge. The language's ability to model complex ideas like recursion and higher-order functions visually makes it suitable for university-level courses, bridging the gap to languages like Python (programming language) and JavaScript.
The interpreter is implemented in JavaScript and executes entirely client-side, communicating with a Cloud variable server for multiplayer projects. It uses a continuation-passing style interpreter to enable first-class continuations and coroutines. The user interface is built with the Morphic (software) framework, and the system can export projects to standalone HTML files. It supports Unicode and includes a JSON serializer. The entire source code is available under the GNU Affero General Public License on the GitHub platform.
While both are block-based languages aimed at education, Snap! extends Scratch (programming language) significantly by adding features from professional programming languages. Unlike Scratch, Snap! supports user-defined Block (programming) with inputs, recursion, and lexical scoping. It provides lists as first-class entities and includes advanced data types. The development environment of Snap! is more customizable, allowing for the creation of new palettes and the modification of the GUI. Furthermore, Snap! is used in more advanced academic contexts, such as teaching formal logic and lambda calculus, whereas Scratch is predominantly focused on introductory creative learning.
Category:Visual programming languages Category:Educational programming languages Category:Free software programmed in JavaScript