[ale] Perl coding style

Brandon Wood woody at 2143.net
Fri Jan 18 12:00:44 EST 2013


Using a main block is fine; I've seen it suggested many times by people I
consider to be competent Perl programmers. Not sure why anyone should get
mad at that.

Oh, wait, that's right, we're talking on the Internet...   :P


On Fri, Jan 18, 2013 at 4:45 PM, Chris Fowler
<cfowler at outpostsentinel.com>wrote:

> On 01/18/2013 10:43 AM, Charles Shapiro wrote:
>
>> Of course, it might have to do with geezer-coders (like me) who learned
>> C first. You have to define a subroutine before you can use it in C. You
>> can either write an explicit function prototype (e.g. "int
>> my_dog_sex(char *,int);" ) before calling your function, or you can
>> define the whole function before calling it.  This makes it more
>> convenient to put  your functions above your main() call, as then you
>> didn't have to type in or maintain prototype lines in addition to the
>> functions themselves.
>>
>
>
> Yes.  My motivation for doing the main() is because it makes it much
> easier to figure out where the program "starts".
>
>
>
> ______________________________**_________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/**listinfo/ale<http://mail.ale.org/mailman/listinfo/ale>
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/**listinfo<http://mail.ale.org/mailman/listinfo>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20130118/cda29025/attachment.html>


More information about the Ale mailing list