Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://992179]
help
Chatterbox?
Corion waves to virtualsue
[virtualsue]: I have made a post for the first time in ... years
[marto]: hey virtualsue!
Eily thought about Neko Case first, something might be wrong with my brain's wiring
[virtualsue]: I recommended dbic-migration even though I am having trouble with it this week. It might be my fault.
[ambrus]: wow! I haven't seen you here for a long time, virtualsue
virtualsue waves back
[Eily]: it would have been 2 years in 2 weeks actually. And welcome back virtualsue :)
[Corion]: I think I saw virtualsue more recently in person than online :-D
[virtualsue]: It's true that there was a bigger gap between the 2 yr old post and the one before it

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (15)
As of 2017-09-26 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (295 votes). Check out past polls.

    Notices?