On Thursday, June 6, 2002, at 06:31 , Camilo Gonzalez wrote:
[..]
> Since this is a list for newbies, can you please be a bit more specific 
> why
> you are opposed to those things you list. I'm quite fond of using the &foo
> or &foo(args) calling styles. Is this just a personal preference?
>
[..]
Bob Said:
> Here are my recommendations for new code (others may want to debate these)
> :
>
> 1. Always "use strict;"
>
> 2. Don't use prototypes.
>
> 3. Don't use the &foo or &foo(args) calling styles.
>
> 4. To call a sub with no arguments, use an empty set of
>    parens: foo() (Exception: method calls can leave
>    off the parens, e.g: $sth->execute; since there is
>    no ambiguity with a method call).

notBob says:

        1) the 'use strict' pragma helps pop out things
                like wacko ref cases as well as making sure
                that you do not have any wacko sub situations
                and will WHINE at you at compile time.... This
                while ANNOYING at compile time helps impose good habits,
                probably faster than making you stand at the chaulk board
                writing

                        I will not write bad code x 1_000_000_000

                to impress upon the impressionable that good form is elegant.

        2) the 'prototype' approach gets harry and messy when you
                start certain types of software development - it was an
                interesting idea - but as you will note in the 3rd edition
                of programming perl it is not recommended.

                { Nikola probably has sanity issues that he is resolving
                        with prototyping - but then again, most of us are all
                        sublimating one or more issues in perl... }

                May I recommend Miss Happy's House of Dominitrix Delights
                if you have unresolved bondage needs as a simpler and more
                direct solution to prototyping perl functions.

                { I think 'use subs qw/..../;' is not as cool as it was either. }

                /* do not let me prevent you from learning the hard way. */

        3) the &foo and &foo(@arglist) models are 'old perl' - and it
                was so much nicer once we were allowed to go with

                        foo();

                so that the 'oldGuys' felt more at home that this was
                a 'function' that was called with no args... Nothing like
                that annoying typo HELL of

                if ( $wombat && foo(@arglist) )

                which you had intended to have been the &foo() bitwise
                added with $wombat - but got the logical anded..... OYE!
                You find that one at Oh-Dark-Squat without a Whole Lot of
                Mountain Dew and.....

{ hey crayon heads - did your colour coded perl IDE help in this case? }


In short these are recommendations based upon life experience,
our life, our experience - you are free to go with the flow or
not - but if you see me 'weaving down the road' while walking,
just accept the fact that I do that to make it harder on the
amatuer snipers..... If you see me running, all you need to
do is be in front of me.....

ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to