Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon



Monkey is a pl created in 2011.

#179on PLDB 11Years Old 290Users
3Books 0Papers 254Repos

Monkey X is a high-level programming language designed for video game development for many different platforms, including desktop and laptop computers, mobile phones, tablets, and video game consoles. The language itself is an object-oriented dialect of BASIC, which the compiler translates into native source code for several target platforms. The resulting code is then compiled normally. Read more on Wikipedia...

Example from hello-world:
puts("Hello World")
Example from Linguist:
'Showcases use of Lambda functions and Generics. #Import "<std>" Using std.. Function Main() Local testStack := New Stack< MyObject > For Local n := 1 To 20 Local newItem := New MyObject newItem.depth = Rnd( 0, 100 ) testStack.Push( newItem ) Next testStack.Sort( Lambda:Int( x:MyObject,y:MyObject ) Return x.depth<=>y.depth End ) For Local n := Eachin testStack Print( n.depth ) Next End Struct MyObject Field depth := 0 End
Example from Wikipedia:
' The 'Player' class, as referenced previously (Placement does not matter): Class Player ' Declare all of our fields (Class-local variables): ' These two variables will act as our position on the screen. ' (Alternatively, an 'Array or third-party class could be used) Field x:Float, y:Float ' This will be a reference to an 'Image' object we'll specify. Field image:Image ' Constructor(s): ' Overloading 'New' mainly works the same way as constructors in other languages. ' Returning is generally not recommended for constructors. Method New(img:Image, x:Float=100, y:Float=100) ' Due to the arguments using the same names, 'Self' ' is required to resolve our fields' names: Self.image = img Self.x = x Self.y = y End ' Methods: ' This will be our main render-method for this object: Method Draw:Void() ' Draw the 'image' object to the screen using our 'x' and 'y' fields. DrawImage(image, x, y) ' Returning in a 'Void' function is not required. (Some still recommend it) Return End End

Language features

Feature Supported Example Token
MultiLine Comments
Binary Literals
' \%[10]+
' [0-9]+
' [0-9]+\.[0-9]*(?!\.)
' \$[0-9a-fA-Z]+
"Hello world"
Print() Debugging puts
' A comment
Line Comments
' A comment
Semantic Indentation ϴ

Books about Monkey from ISBNdb

title authors year publisher
Addicted to the Monkey Mind: Change the Programming That Sabotages Your Life Benoist, J.F. 2018 Pakalana Publishing
Addicted to the Monkey Mind: Change the Programming That Sabotages Your Life Benoist, J.F. 2018 Pakalana Publishing
Programming Beyond Practices: Be More Than Just a Code Monkey Brown, Gregory T 2016 O'Reilly Media
eulisp.html · monkey.html · rfc.html

View source

PLDB - Build the next great programming language · v2022 · Day 33 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub ·