Last active
October 1, 2015 04:08
-
-
Save jpaugh/1917182 to your computer and use it in GitHub Desktop.
The night after...
This file contains 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
/** | |
* This is what happens when I try eating breakfast after having spent | |
* the previous night hacking away on some graphical programming. | |
* ActionScript 3 was the language of choice---or, urm, Haxe---but the | |
* code is here prescribed in Java. (ActionScript 3---or actually | |
* Haxe---supports all of the language constructs I use here; I just | |
* don't remember the syntax exactly; and, after several years using | |
* OOP, my brain can OOPs! without any particular language.) | |
*/ | |
public class Breakfast { | |
public static void main(args...) { | |
Egg eggs[3]; | |
int i; | |
for (i = 0; i < 3; i++) { | |
eggs[i] = cast BlestFood new Egg(); | |
} | |
Bacon bacon_strips[10]; | |
for (i = 0; i < 10; i++) { | |
bacon_strips[i] = cast BlestFood new Egg(); | |
} | |
i = 0; | |
foreach(egg : eggs) { | |
egg.combine(bacon_strips[i++].location()); | |
egg.eat(); | |
} | |
for(;i < bacon_strips.length(); ++i) { | |
bacon_strips(i).eat(); | |
} | |
} | |
} | |
interface BlestInterface { | |
/** | |
* Very important interface which indicates that I have prayed over my | |
* food already. Contains one method, the eat() method. Jesus and I | |
* enjoy that method. | |
*/ | |
public void eat(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After reflection, I realize this won't compile. Well, my brain never was very good at Java... Say, have you tried Python?