Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Apparent Inconsistencies in Perl Function Naming

by jontnswift (Initiate)
on Nov 28, 2000 at 21:09 UTC ( #43707=note: print w/ replies, xml ) Need Help??


in reply to Re: Apparent Inconsistencies in Perl Function Naming
in thread Apparent Inconsistencies in Perl Function Naming

> So, it may be best for a trained Perl programmer, but think from the mind of your boss or your secretary or someone else who just wants something simple and fast and you will see what the most intuitive thing is.

The boss and the secretary do not code in Perl. That's what they pay me for. ;->


Comment on Re: Re: Apparent Inconsistencies in Perl Function Naming
The Secretary wants to Make LWP Requests too...
by princepawn (Parson) on Nov 28, 2000 at 21:31 UTC
    Programming is the practice of converting human thought to computer syntax. Programming has seen an evolution from punched cards, to machine language, to assembler language, to C and to Perl. In each case, the language has moved further from "speaking to the CPU" to "here's what I want to do."

    An acid test of such evolution is the ability of the commoner to codify his thoughts in working programs. While Window-based menu systems go a long way towards providing such functionality, to date they are not as configurable as a scripted program and hence the need for a language allowing for expressiveness by everyone, not just the person trained to convert human thought to computer syntax.

      Programming is the practice of converting human thought to computer syntax. Programming has seen an evolution from punched cards, to machine language, to assembler language, to C and to Perl. In each case, the language has moved further from "speaking to the CPU" to "here's what I want to do."

      I'm going to weigh in with heavy support for this statement. One of the great things about Perl is that Larry questioned some of the assumptions other languages made, and thus moved the line between DWIM and DWIS closer to DWIM. There has to be a limit somewhere though, which is why I also disagree with the initial post.

      As has been mentioned, there's always been a faction that dislikes the can-be-misleading name of length(). This is the first time I've ever heard a complaint about array slices, and I can't say I agree with that complaint.

      The approach to take is not "This is wrong" but "how can I make this right in all cases". Length,as has been mentioned, shouldn't be too hard to change with no real loss. If you can come up with new examples where a "commoner" would think something, and a fix that doesn't break the flow of a long-term programmer, detail it. Submit a proposal to the Perl maintainers, write a patch, or whatever.

      On one level you're right. Languages are designed to fit with our personal understanding and methods of thought. The early programming languages took none of this into account, which made software design difficult at best. Most languages take the approach of, "The reason software design is difficult is that you're not using enough (functions|variables|comments|linguistic_names|classes|libraries). In truth, the reason programming is so difficult is that thinking is so difficult.

      Most people have a prefered method of thinking and do not want to change that. Programming opens you up to new ways of thinking, and Perl opens you up the most because it encourages so many different ways of attacking a problem.

      So in some sense, princepawn, you're also wrong. That's because if the language doesn't make sense to you, the programmer, the problem is with the programmer for being unwilling to adopt the language's mindset. And this is as true of Cobol as it is of Perl, although Perl definitly encouages more ways of thinking about a problem.

      Princepawn, I feel like your view of the perl mindset is, "Whatever makes sense to my mind should be easy to describe in perl." You're claiming that you are the "enlightened" one and that it's perl's job to enlighten itself. In reality, each time you say, "This doesn't make sense to me-- someone else must have done this wrong," you move further away from understanding the true purpose of perl.

      The true purpose of perl is to serve others, but it can only do this if you humble your mind. But much like enlightenment, I suppose that needs to be experienced, not explained.

      -Ted
        Princepawn, I feel like your view of the perl mindset is, "Whatever makes sense to my mind should be easy to describe in perl."

        The operative word in your statement is feel and certainly it must be, because the very first part of the attack I launched on the discrepancy between concept and naming in Perl syntax was to discuss my boss and his problems with the language. So, I wasn't saying it should only make sense to my mind.

        The true purpose of perl is to serve others, but it can only do this if you humble your mind.

        Hmm, well the over 200 submitted RFCs and the fact that Larry Wall is planning a complete rewrite of the language from the ground up should tell you something: even Larry Wall thinks that the current Perl has problems serious enough that they cannot be reconciled within the framework of evolution that occurred from @perl = (1..5);

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2014-07-29 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (226 votes), past polls