[SP-pm] Referências

Alexei Znamensky russoz at gmail.com
Mon Nov 17 18:34:30 PST 2008


-------beginquote-------
Now let's open the case for the prosecution. Let's assume that we have a
persistent whiney developer who is determined to use prototypes on every
Perl subroutine and is attempting to defend his choice:

1. Prototypes allow Perl to pick up errors in subroutine calls.

This is a common mistake made by developers who have a background with 'C',
since this is exactly what 'C' prototypes are for. *It is unfortunate that
Perl uses the name 'prototype', since in Perl, the feature exists for an
entirely different reason - to allow Perl to silently coerce the arguments
into a form that matches the prototype. In fact Perl's compiler will only
throw errors if it can't manage to do that.*
---------endquote---------

Exatamente o que eu pensei enquanto lia. Péssima escolha de nome, não
deveriam ter chamado de protótipos. Aliás, realmente, tirando o syntax sugar
eventual, RUN FORREST, RUUUN!

On Tue, Nov 18, 2008 at 12:23 AM, Eden Cardim <edencardim em gmail.com> wrote:

> 2008/11/17 Alexei Znamensky <russoz em gmail.com>:
> > Eden,
> >
> > Por gentileza, você pode me explanar um pouco mais sobre isso? Qual a
> lógica
> > para desaconselhar o uso de protótipos como mecanismo de verificação?
>
>
> http://stackoverflow.com/questions/297034/use-of-function-prototypes-in-perl
> http://www.perlmonks.org/?node_id=406231
> http://www.perlfoundation.org/perl5/index.cgi?prototype
>
> --
>    Eden Cardim       Need help with your Catalyst or DBIx::Class project?
>  Code Monkey                    http://www.shadowcat.co.uk/catalyst/
>  Shadowcat Systems Ltd.  Want a managed development or deployment platform?
> http://edenc.vox.com/            http://www.shadowcat.co.uk/servers/
> _______________________________________________
> SaoPaulo-pm mailing list
> SaoPaulo-pm em pm.org
> http://mail.pm.org/mailman/listinfo/saopaulo-pm
>



-- 
Alexei Znamensky [russoz_gmail_com] [russoz.wordpress.com] [
www.flickr.com/photos/alexeiz]
"Though we live in trying times, we're the ones who have to try"
-------------- Pr�xima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/saopaulo-pm/attachments/20081118/385d355c/attachment.html>


More information about the SaoPaulo-pm mailing list