Pseudocode in the wikipedia

James Stroud jstroud at mbi.ucla.edu
Fri Apr 1 15:15:35 EST 2005


Is anybody else bothered by those stupid pascal-like ":=" assignment 
operators?

Maybe, for the sake of adding more variety to the world, wiki should come up 
with a new assignment operator, like "==". I like that one because then it 
could really be original:

if (bob = 4):
  bob == bob + 2

See how nice that looks? Then we could have people who are used to python and 
c and perl complaining that "=" is for comparison and "==" is for assignment. 
Then the wikilitests would say "hey, man, part and parcel of being a 
programmer is getting assignment and comparison straight--and not making 
typos, you buffoon". But then the guys who have to program in a bunch of 
languages would point out how the wikilitests only psuedo code in wiki--so 
they would never even run the code they wrote. And then some understanding 
fellow would recommend a wiki precompiler to catch "==" inside of "if" 
statements, but then someone else would say that it would limit the 
expressiveness of wiki language:

bob == (carol = 2):
  if bob = (bob or carol):
    bob == 4

But no one could figure out what bob was supposed to equal anyway. And then 
someone would say something about a "Turing Machine", just to show that 
theoretically, the above code could be understood by something theoretical.

James

On Friday 01 April 2005 11:23 am, Terry Reedy wrote:
> <bearophileHUGS at lycos.com> wrote in message
> news:1112362451.848227.208120 at z14g2000cwz.googlegroups.com...
>
> > The free wikipedia is adopting a standard pseudocode:
> > http://en.wikipedia.org/wiki/Wikipedia_talk:Wikicode/Specification

-- 
James Stroud, Ph.D.
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/



More information about the Python-list mailing list