Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Teaching Perl

by Tanktalus (Canon)
on Sep 06, 2012 at 19:54 UTC ( #992179=note: print w/replies, xml ) Need Help??

in reply to Teaching Perl

My favourite bit:

What I'd like to be able do in practice is teach one canonical Way To Do It, and leave the more advanced syntax for an advanced session, or for newcomers to discover in their own time.
and then, two paragraphs later:
Perl also has many simple little things like the unless and until keywords, which are self-explanatory and make life much easier, and the short statement if condition and statement foreach list formations.
So, he wants one way to do everything, then turns around and compliments syntactical sugar added to the language that simply provides alternate ways of doing things.

I'm sorry, but I have a hard time taking someone seriously when they cry for consistency ... inconsistently.

Mind you, I've taught a handful of people perl (not 50, more like fewer than 10) and never encountered any of the concerns he brings up. Then again, I bring up things like TMTOWTDI as a feature instead of as a wart of the language, and so those I talk to start to treat it as such. (I also point out that despite being more than one way to do things, that doesn't make all ways equal - which one is best may depend on what you're doing, etc.)

Replies are listed 'Best First'.
Re^2: Teaching Perl
by Tux (Abbot) on Sep 07, 2012 at 05:47 UTC

    Also note that unless and until are "naturally" for people with a native English tongue, but they can be very confusing for those who are not. I actually know TWO people that specifically asked me NOT to use unless in code they have to read/maintain as they have a hard time to understand what it does.

    OTOH, I have added unless as a keyword to my C-files as '#define unless(c) if (!(c))', as I do like it :)

    Enjoy, Have FUN! H.Merijn
Re^2: Teaching Perl
by ambrus (Abbot) on Sep 06, 2012 at 20:11 UTC

    I think that's consistent. He would like to do one thing, but can't, because perl simply does not allow that.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://992179]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2017-01-21 01:01 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (180 votes). Check out past polls.