<?xml version="1.0" encoding="windows-1252"?>
<node id="194637" title="Are prototypes evil?" created="2002-09-02 16:56:44" updated="2005-08-13 20:45:51">
<type id="120">
perlmeditation</type>
<author id="190985">
Django</author>
<data>
<field name="doctext">
&lt;p&gt;Dear Monks,&lt;br&gt;
these thoughts arose in another thread, so I quote for introduction:&lt;br&gt;
[Django] &amp;quot;Why do you consider Perl 5 prototypes as evil? I like the ability to use subs like built-ins.&amp;quot;&lt;br&gt;
[tadman] &amp;quot;They are poison. You should only use them when you have to, like forcing an array or subroutine reference...&amp;quot; [id://194573|&amp;lt;whole reply&amp;gt;]&lt;/p&gt;
&lt;p&gt;I don't think that prototypes &lt;font size="-1"&gt;(sub($){}, not software prototypes)&lt;/font&gt;, or any other of Perls possibilities can be condemned in general. &lt;font size="-1"&gt;&lt;i&gt;(well, you may call &lt;b&gt;map&lt;/b&gt; wicked ;)&lt;/i&gt;&lt;/font&gt; As long as you know what you are doing, and why you are doing it that way, you can benefit from every technique IMHO. But I'm just another Perl newbie, and would appreciate to learn from your experience. So, is code like the following only useful for poetry? Is it a triumph of lazyness? Is it dangerous? Any suggestions are welcome.&lt;code&gt;
sub Learn ($);  sub expand ($);  sub smile ();

Learn $Perl, expand $wisdom &amp;&amp; smile;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;update:&lt;/b&gt; added semicolons to the declarations, [Zaxo] pointed the error out.&lt;/p&gt;
&lt;p&gt;&lt;sup&gt;~&lt;/sup&gt;&lt;i&gt;Dj&lt;/i&gt;ango&lt;br&gt;
&lt;!-- Joe Malik at KCUF convention, AUM beginning to work: --&gt;
&lt;font size="1"&gt;&amp;quot;Why don't we ever challenge the spherical earth theory?&amp;quot;&lt;/font&gt;&lt;/p&gt;
</field>
</data>
</node>
