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

Re: Re: Re: Re: On Scalar Context

by EdwardG (Vicar)
on Apr 27, 2004 at 10:56 UTC ( #348437=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Re: On Scalar Context
in thread On Scalar Context

This is a problem with the Perl mindset. DWIM has no value when "Do What I Mean" means different things to different people.

Well now, this is quite a provocative thing to say to an audience of perl fans, so kudos for the big cajones at least.

I think I hear what you are saying about the benefits of consistent behaviour, and I have sympathy for this view. It's just that I think consistency can be taken too far, and the price paid for such consistency is in sophistication, and thereby expressiveness.

If you accept that perl is a language, the primary goal of which is communication, perhaps you can also accept that the process of learning perl is analogous to the process of learning a spoken language.

The spoken language initiate, will obviously have an easier time if the language has only a small number of words, together with a strict and comprehensive set of rules for their usage. If language rules have a wide application, so much the easier.

But the fluent language speaker has a completely different perspective. Imagine how frustrating it would be to not have contractions such as "aren't", and "I'm". Imagine having only negating modifiers such as with "good" and "ungood" instead of antonyms like "good" and "bad".

Now, you might think I'm stretching the analogy too far (it's true I'm often guilty of this), but reflect on how you use your preferred programming language, let's say perl for the sake of argument. Think of how often you use $_.

Think also about code that you would generally upvote; is it spelled out in baby talk, or is it laden with expressive idioms?. If we elevate the importance of consistency as you would define it, we would necessarily lose one of the defining characteristics of perl.

To borrow from a respected perlmonk's home node, perl is complicated in a good way, and none of us would exchange that, not for all the consistency in China.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://348437]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2020-02-28 03:56 GMT
Find Nodes?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?

    Results (122 votes). Check out past polls.