Snap! (programming language)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Snap! (BYOB)[Note 1]
Paradigmobject-oriented, educational, event-driven
Designed byBrian Harvey and Jens Mönig
DeveloperJens Mönig
First appeared2011; 9 years ago (2011)
Stable release
6.0.0 / October 9, 2020; 16 days ago (2020-10-09) [1]
Typing disciplinedynamic
Implementation languageJavaScript (Snap!), previously Squeak (BYOB version)
Filename extensions.xml (Snap!)
Influenced by
Scratch, Scheme, Logo, Smalltalk
BeetleBlocks, Snapi, Dragme IDE

Snap! (formerly Build Your Own Blocks or BYOB) is a free, block-based educational graphical programming language and online community aimed at students to explore, create and re-mix interactive animations, games, stories, and more, while learning about mathematical and computational ideas. While inspired by Scratch, Snap! has many advanced features. The Snap! editor, and programs created in it, are web applications that run in the browser (like Scratch 2 and 3) without requiring installation. [Note 2]

User interface[edit]

Three resizable columns, containing five regions, in the Snap!'s IDE at startup

In Snap!, the screen is organized in three resizable columns containing five regions: the block group selector (top of left column), the blocks palette (left column), the main area (middle column), and the stage area (top of right column) with the sprite selector (also called the sprite corral) showing sprite thumbnails below it.[Note 3]

In the interactively resizable stage area (full-screen is available, too) are drawn the graphical results (i.e. animations, graphics, etc.) of the scripts running in the script area, and/or interactively double-clicked individual blocks in any palette. Individual blocks can be dragged from the palette onto the scripts area to be associated with the selected sprite.

Category Notes    Category Notes
  Motion Moves sprites and
changes angles
     Control If statements, events,
and loop structures
  Looks Controls visibility,
costumes, and output
  Sensing All sprite hit detection
and user input
  Sound Plays audio files and
programmable sequenced audio
  Operators Mathematical and
Boolean operators
  Pen Allows for
turtle graphics
  Variables Variables, lists,
including lists of lists

Snap!'s blocks are divided into eight groups: Motion, Looks, Sound, Pen, Control, Sensing, Operators, and Variables. The layout of these groups in the block group selector is shown in the table below.

The main area can show scripts, costumes, or sounds associated with the selected sprite. What the main area shows is dependent on the selected tab.


The most important features that Snap! offers, but Scratch does not, include:

  • expressions using "nested functions", consisting of one or more "anonymous functions", each of which is represented by a block having one or more empty(ed) slot(s)/parameter(s) that are waiting for a "higher order function" (the one that is calling the anonymous one) to be filled by. (Their computer-science theoretical basis being First class functions, which in turn have "Lambda calculus" as their even more abstract, mathematical, foundation),
  • lists that are first class (including lists of lists),
  • First class sprites (in other words prototype-oriented instance-based classless programming),
  • nestable sprites
  • codification of Snap! programs to mainstream languages such as Python, JavaScript, C, etc.


The web-based Snap! and older desktop-based BYOB have been both developed by Jens Mönig for Windows, OS X and Linux[2] with design ideas and documentation provided by Brian Harvey[3] from University of California, Berkeley and have been used to teach "The Beauty and Joy of Computing" introductory course in computer science (CS) for non-CS-major students.[4] They were both members of the Scratch Team before creating Snap![5]. BYOB is still available for downloading.


The source code of Snap! is Affero General Public License (AGPL) licensed and is hosted on GitHub.[6] The earlier, desktop-based 3.x version's code is available under a license that allows modification for only non-commercial uses and can be downloaded from the UC Berkeley website[7] or CNET's and TechTracker download page.[8][9]


Snap! is implemented in JavaScript using an HTML5 Canvas application programming interface (API),[Note 4][citation needed] and because of that it runs on the major web-browsers on Windows, iOS, OS X and Linux devices.


Snap! has been recognized by the Logo Foundation,[10] and reviewed in an online magazine for programmers.[11] As of December 2014, 100 New York City (NYC) high schools will introduce University of California, Berkeley's “Beauty and Joy of Computing” as a new AP Computer Science Principles course in 2015, using Snap!.[12]


  1. ^ Program versions 6.2.3
  2. ^ BYOB, Snap! 's predecessor, was a modification of Scratch that exported projects as Windows executables.
  3. ^ The way pre-2.0 Scratch version's screen was organized.
  4. ^ In contrast, Scratch 2.0 was written in Adobe Flash, so it cannot run on Linux without Adobe Air.


  1. ^ "jmoenig/Snap". GitHub. Retrieved 29 August 2019.
  2. ^ "Scratch - Imagine, Program, Share". Retrieved 21 May 2017.
  3. ^ "HomePage for Brian Harvey (bh@cs.Berkeley.EDU)". Retrieved 19 January 2019.
  4. ^ "UC Berkeley EECS - CS10 : The Beauty and Joy of Computing - Fall 2011". Retrieved 21 May 2017.
  5. ^
  6. ^ "jmoenig/Snap". GitHub. Retrieved 21 May 2017.
  7. ^ "Snap! (Build Your Own Blocks) 4.0". Retrieved 21 May 2017.
  8. ^ CNET and CNET TechTracker's BYOB for Windows download page
  9. ^ CNET's and TechTracker BYOB for Mac download page
  10. ^ "Logo History". Retrieved 21 May 2017.
  11. ^ Editor. "Visual Language Snap! Version 4.0 Released". Retrieved 21 May 2017.CS1 maint: extra text: authors list (link)
  12. ^ "FACT SHEET: New Commitments to Support Computer Science Education". 8 December 2014. Retrieved 20 January 2019.

External links[edit]