<?xml version="1.0" encoding="windows-1252"?>
<node id="124440" title="Re: (tye)Re: When to use Prototypes?" created="2001-11-09 17:53:16" updated="2005-08-12 09:56:55">
<type id="11">
note</type>
<author id="108447">
demerphq</author>
<data>
<field name="doctext">
&lt;em&gt;Now I only use prototypes for making compile-time constants and to emulate map's and grep's ability to take bare blocks as code references (and this latter use is quite rare and really only gives a very minor benefit of not having to see "sub" in front of each block). &lt;/em&gt;
&lt;p&gt;
Yeah the bare block trick was what I meant by 'unusual situations' :-) A quick question (which I could answer myself after a bit of testing, but it seems like a point that should be shared) doesn't it also coerce a statement into a block as well?&lt;p&gt;
My second question is how do prototypes help you with compile time constants? I assume you are talking about something like 
&lt;code&gt;
sub LOW_PRE_PI {3.141}
&lt;/code&gt;
and I dont see where prototypes come into play. Am I missing something?
&lt;p&gt;
Yves / DeMerphq&lt;br&gt;
-- &lt;BR&gt;
&lt;em&gt;Have you registered your &lt;b&gt;&lt;A HREF="/index.pl?node=Name%20Space&amp;lastnode_id=1072" NAME&gt;Name Space&lt;/A&gt;&lt;/b&gt;?&lt;/em&gt; </field>
<field name="root_node">
124339</field>
<field name="parent_node">
124413</field>
</data>
</node>
