|
Yoda programming language |
Trezker
Member #1,739
December 2001
|
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 |
Matthew Leverton
Supreme Loser
January 1999
|
Perl seems to do everything backward to me. Maybe it is the Yoda language? |
Neil Black
Member #7,867
October 2006
|
I'm still waiting on the Chewbacca programming language: BBWWAAAA!!!("Hello World");
|
Thomas Fjellstrom
Member #476
June 2000
|
Quote: Perl seems to do everything backward to me. Maybe it is the Yoda language? I think you're thinking of Forth -- |
alethiophile
Member #9,349
December 2007
|
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. -- |
Kibiz0r
Member #6,203
September 2005
|
But how would you do exception handling, since there is no try? --- |
Erikster
Member #9,510
February 2008
|
Kibiz0r said: But how would you do exception handling, since there is no try? Dang, beat me to it. Cat! I'm a kitty cat. And I dance dance dance, and I dance dance dance. |
Trezker
Member #1,739
December 2001
|
do? { codestuff } did not(reason) { speak(reason); }
|
Arthur Kalliokoski
Second in Command
February 2005
|
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!" They all watch too much MSNBC... they get ideas. |
Cody Harris
Member #4,406
March 2004
|
Yoda does not need to worry about exceptions, his code is infallible. --------------------------------- |
alethiophile
Member #9,349
December 2007
|
(do||!do) !try
-- |
ReyBrujo
Moderator
January 2001
|
Perl does something similar: print "Hello World!" if ($test == 1); -- |
Thomas Fjellstrom
Member #476
June 2000
|
print "Hello World!\n" unless not $test; -- |
ixilom
Member #7,167
April 2006
|
Neil Black said: BBWWAAAA!!!("Hello World"); haha, that made me laugh and its only 9.30 am, good job ___________________________________________ |
Gr4|\|f
Member #9,499
February 2008
|
But luke, not ready are you. if (!ready) { throw(jedi['luke']); }
Ping me @ 127.0.0.1 |
alethiophile
Member #9,349
December 2007
|
question = (2b||!2b)
-- |
Gr4|\|f
Member #9,499
February 2008
|
Quote: question = (2b||!2b) No, that's already the question, you don't have to set it. question == (2b||!2b)
Ping me @ 127.0.0.1 |
alethiophile
Member #9,349
December 2007
|
No, but you're stating that "that is the question", you're not asking "Is that the question?" -- |
Trezker
Member #1,739
December 2001
|
that=(2b||!2b)?question:!question;
|
|