GIGO: words unreadable aloud
Mishrogo Weedapeval
 

 

  Wednesday 5 March 2003
Miranda prototypes

Jim Weirich, on the Ruby mailing list, wrote:

In ANSI C, a function without a prototype is automatically given a "Miranda"[0] prototype that matches the arguments of its first use. Usages after the first use will use the miranda prototype.

[0] Miranda Prototypes. So named for the US miranda rights read to criminals upon arrest ... paraphrased in part "... if you do not have an attorney, one will be appointed to you ...". Substitute "prototype" for "attorney".

Weird. I don't recall reading about that in any of the ANSI C Standards. (Maybe the years of being on the C++ Standards committee pushed that bit out of my brain, or maybe this is one of the changes in C99?)

I hadn't heard the term "Miranda prototype" before, but my first reaction was that it had to do with a different section of the legal spiel. The section most commonly mentioned says "You have the right to remain silent" ... about which type(s) of argument(s) you expect. In other words, a function without a prototype is given a prototype which will accept any arguments.
9:25:35 AM   comment/     



Click here to visit the Radio UserLand website. Click to see the XML version of this web page. © Copyright 2007 Doug Landauer .
Last update: 07/2/6; 12:29:57 .
Click here to send an email to the editor of this weblog.

March 2003
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Feb   Apr

Previous/Next