I just set here programming and suddenly I inversed the order of a return so it became "x return;" instead of "return x;"
So the thought struck me that a Yoda programming language would be a fun addition to the likes of chef, shakespeare etc...
Of course I'm not the first guy to think of this. A microsoft emplyoee apparently took some time off blogging about getting this idea. But he didn't go very deep, and I would like to argue that his example sucks. http://blogs.msdn.com/mattwar/archive/2005/10/09/479008.aspx
So I'm wondering if the members of this community can do better.
if imaginative you are
example make you must
Perl seems to do everything backward to me. Maybe it is the Yoda language?
I'm still waiting on the Chewbacca programming language:
BBWWAAAA!!!("Hello World");
Perl seems to do everything backward to me. Maybe it is the Yoda language?
I think you're thinking of Forth
It wouldn't be hard to write a grammar alterer with lex/yacc that takes some-language-with-reversed-words and returns that-language-correct.
But how would you do exception handling, since there is no try?
But how would you do exception handling, since there is no try?
Dang, beat me to it.
do? { codestuff } did not(reason) { speak(reason); }
Doesn't Polish notation (for calculators) fit the bill?
Otherwise, if this Yoda language took off, there wouldn't be a need for allegro.cc to aid beginners, since "There is no try, there is only do!"
Yoda does not need to worry about exceptions, his code is infallible.
(do||!do) !try
Perl does something similar:
print "Hello World!" if ($test == 1);
print "Hello World!\n" unless not $test;
BBWWAAAA!!!("Hello World");
haha, that made me laugh and its only 9.30 am, good job
But luke, not ready are you.
if (!ready) { throw(jedi['luke']); }
question = (2b||!2b)
question = (2b||!2b)
No, that's already the question, you don't have to set it.
question == (2b||!2b)
No, but you're stating that "that is the question", you're not asking "Is that the question?"
that=(2b||!2b)?question:!question;