Last active
December 24, 2015 14:29
-
-
Save technosophos/6813335 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Meme++: A Langugae For The Moment | |
| ## Control Structures | |
| ### iDontOften/butWhenIDo | |
| Evaluates BLOCK when CONDITION is TRUE | |
| ``` | |
| iDontOften BOOLEAN_CONDITION | |
| butWhenIDo { | |
| BLOCK | |
| } | |
| ``` | |
| ### yuNo | |
| Evaluates block when CONDITION is FALSE. | |
| ``` | |
| yuNo BOOLEAN_CONDITION { | |
| BLOCK | |
| } | |
| ``` | |
| In either block, if the condition fails, it can be followed by an optional (else) execution path: | |
| ``` | |
| yuNo BOOLEAN_CONDITION { | |
| BLOCK | |
| } | |
| areUKiddingMe { | |
| BLOCK | |
| } | |
| ``` | |
| ## Error Handling | |
| When an error is fatal, the `tableflip()` built-in should be called to begin unwinding the function stack: | |
| ``` | |
| yuNo doSomething() { | |
| tableflip("RAGE!") | |
| } | |
| ``` | |
| Unwinding can be stopped by trapping: | |
| ``` | |
| itsATrap tableflip("RAGE!") { | |
| facepalm("Caught the rage.") | |
| } | |
| ``` | |
| ## Built-in Functions | |
| Write to STDERR: | |
| ``` | |
| facepalm(MSG) | |
| ``` | |
| To handle assertions: | |
| ``` | |
| challengeaccepted(CONDITION) | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment