Questions Concepts
GitHub icon


spry - Programming language

< >

spry is a programming language created in 2015 by Göran Krampe.

Source code:
git clone
#852on PLDB 8Years Old

Spry borrows homoiconicity from Rebol and Lisp, free form syntax from Forth and Rebol, the word of different types from Rebol, good data structure literal support from JavaScript and the general coding experience and style from Smalltalk. It also has a few ideas of its own, like an interesting argument passing mechanism and a relatively novel take on OO.

Example from the web:
# Let's add a method to:do: that works as in Smalltalk. # Methods take the first argument, the "receiver", from the left # and binds it to "self". to:do: = method [:to :block n = self [n <= to] whileTrue: [ do block n ..n = (n + 1)]] # Then we can loop in Smalltalk style echoing 1 to 5! 1 to: 5 do: [echo :x] # We can similarly implement select: from Smalltalk select: = method [:pred result = ([] clone) self reset [self end?] whileFalse: [ n = (self next) do pred n then: [result add: n]] ^result] # Then use it to produce [3 4] echo ([1 2 3 4] select: [:x > 2])
Example from hello-world:

Language features

Feature Supported Token Example
Booleans True False
# A comment
Line Comments #
# A comment
Semantic Indentation X

View source

- Build the next great programming language · Search · Add Language · Features · Creators · Resources · About · Blog · Acknowledgements · Queries · Stats · Sponsor · Traffic · Traffic Today · Day 305 · · Logout