FiM++ is an object-oriented language made by fans of My Little Pony: Friendship is Magic, which takes its name from the initials of the show's subtitle. Its syntax and structure are inspired by Java and ALGOL. The original idea was published on October 4th, 2012 by Cereal Velocity, one of the bloggers on Equestria Daily and inventor of the language, after being unable to find pre-existing programming language based on My Little Pony. It was then picked up by an team of community programmers and completed within the month.
As stated by Cereal Velocity in the initial post,
FiM++ is a dynamically-typed, interpreted, object-oriented language that takes the form of the pony of your choice (I used Twilight for my specification) writing a letter to Princess Celestia. Functions in the language are formatted as paragraphs of the letter. It is intended to be read easily and as in-order as possible, to emulate a letter format. Each letter takes the form of a class, and each program can consist of multiple letters if one so chooses, but the minimum interpreted unit is the class, much like Java. The language does not support libraries- because we are sending a letter the code must be as lightweight as possible. Therefore, all features of the language are packaged with the base interpreter. Datatypes can be enforced if the user desires.
As the language developed, its precise syntax has changed some, but it mostly stayed true to the original idea.
Classes begin with the header "
Dear", followed by the name of the parent class (Base class is "
Princess Celestia"), and end with "
Your faithful student,", followed by the programmer's chosen alias. Functions start with the text "
I learned" followed by the function name and end with "
That's all about" and a re-statement of the function name. The main function is denoted by placing the word "
Today" before the initial "
Branching statements are supported in FiM++, as well as try-catch-finally blocks.
One thing that most sets this language apart is its strive to be layman-readable. To do this, it utilizes synonyms (e.g. a line can end in
? depending simply on the coder's preference) and allows whitespace in class, function, and variable names.
Here is an example of a Hello World program in FiM++:
Dear Princess Celestia: Hello World! Today I learned something simple. I said “Hello, World!”! That's all about something simple! Your faithful student, Twilight Sparkle.
- The FiM++ wiki
- The full FiM++ 1.0 language spec in a Google Doc
- The original EqD post
- The updated EqD post
- Sample implementations of Hello, World! and 99 Bottles
- Discussion between Trey Rust and Cereal Velocity on how to make the language Turing-complete
- A (somewhat incomplete, but usable) FIM++ interpreter written in Scala