Re: FVWM: OT: perl, fvwm perllib requirement for prototypes, and &function calls

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Mon, 20 Jan 2003 10:56:33 +0000

On 19 Jan 2003 20:39:18 -0500, parv wrote:
>
> curious... could it be that perl prototypes are being used for the
> wrong kind of reasons (as fvwm perllib requirement)?

Usually it is enough for me to see the method prototypes to understand
what it does, for example "sub name ($;$)" means object method that is
setter/getter. Functions without prototypes require code examination to be
understood. Since prototypes are unrelable and the function should check
its parameters itself anyway, the main usage is readability.

> > I didn't mean '&' should be used everywhere, I would prefer
> > a predeclaration. There is though one case when I prefer the '&'
> > syntax - recursive functions.
>
> why for recursive functions? also see above.

If you think about a function as a small solid unit that either works or
does not work, it makes sence to predeclare it for external usage and has
no much justification to predeclare it for mere internal usage. Anyway,
since prototypes are ignored for method calls the whole discussion is more
related to scripts/modules than to perllib classes.

Regards,
Mikhael.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Mon Jan 20 2003 - 04:58:01 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:54 BST