Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Are languages just superficial?

by gryng (Hermit)
on Aug 09, 2000 at 18:47 UTC ( [id://27047]=note: print w/replies, xml ) Need Help??


in reply to RE: Structured vs. Unstructured Languages
in thread Learning Programming

Languages aren't just superficial. There are many that would say that a language (and here I am speaking of computer languages and spoken languages) is mearly a tool used to get a job done -- solving a problem, or communicating an idea.

It's easy to see that while this is true, languages can be like any tool, they can get in the way of things, it is also not always the case. Once a language is created it takes a life of itself and becomes more than just a tool. Sure, it can be frustrating to use some language to solve some problems, or communicate some ideas. But look at it the other way around, most languages have an area where they shine.

For example(s) (both IMHO) Perl shines at power programs, those that can be created quickly and easily, and work! English, shines at poetry and illustration. Perl isn't very good at tasks that need alot of structure, and similiarly English lacks a consistant structure as well (which is why both lend themselves so well to dialects).

So if a language can enhance a particular aspect of a program, then it is the thing to use. I would consider Perl an excellent language to teach in. This is because it strips away alot of the menial (sorry, I do not mean this work in a demial way -- I mean tasks that you do not want to do, but have to in order to force structure) tasks that you have to do in other languages that are more structured. By getting rid of the "cruft" you can concentrate less on the language specific aspects of programming and focus instead on problem solving techniques and pitfalls (and I think many of you can agree with both, especially the latter, when it comes to Perl).

Anyways, sorry for the late reply, hopefully you'll still receive it.

Ciao,
Gryn

Replies are listed 'Best First'.
Perl is too sweet (Teaching Perl)
by larsen (Parson) on Aug 10, 2000 at 01:04 UTC
    Thank you for your reply. I think in Perl there's a lot of syntactic sugar.
    Too much. As a programmer with some experience, I like Perl policy "there's more than a way...".
    In a programming course, I think this could be a bit confusing. IMHO. First, learn common programming pattern. Then, develop a personal taste, choose your style. Choose your favourite programming language, if you can.

    Larsen
      Well, I respect your opinion on teaching style, however I respectfully disagree.

      I think that Perl drops most of the extra work you have to do in order to have the computer accomplish your goal (that is, you don't have to do things like (de)allocate memory). Therefore what is presented to you through Perl are all the basic problem solving tools.

      Even if there are a myriad of ways to do the same thing with Perl's plethora of tools, they all embody the different ways of solving problems. And that to me, is the important part when it comes to programming, not knowing the internals to all the data structures and how pointers dereference my memory so I know what happens when I add 10 to it.

      Learning which of these tools to use and when for each problem is the real essence of good programming (problem solving). That is what I would try to teach. Other languages can make the "Right Thing" (tm) too difficult to do (e.g. hashes may be the best solution, but aren't always easy to use in other languages), especially to a new programmer.

      Where other languages will force you to pick the easy way to solve your problem, Perl will tend to allow you to do it the correct way just as easily as the lazy way.

      If you are worried about confusing new programmers, remember that those that will get confused the easiest, probably will also not be the most adventurous. Therefore, if you only show them the simple and straighforward ways, they will only see those ways, and can't be lost by the other options. (for instance you could (gasp!) not show them what a hash is until mid-quarter).

      Just because Perl supports it, doesn't mean you have to show it to them (though I would try to show them as much as you can and also encourage (and perhaps even subtly, such as in homework, force them) to be adventurous).

      Anyway, just my two cents. I see the merit in a guided path, aided by some other stricter language (not to suggest more strict is worse). But I would like (as a new programmer) to be able to explorer all the aspects of my language. And the more relavent those aspects are to problem sovling, and not to the programming language itself, the more useful my explorations are going to be.

      Cheers,
      Gryn

        My limited teaching experienced was based on these points:
        • What I'm trying to teach is problem solving. Programming language is a tool to accomplish this task.
        • Fundamentals are what I call linguistic constructions (loops, if-then-else, data structures and so on).
        • Solutions are expressed in pseudo-code, which I describe as a midpoint between natural and artificial language. So they can solve problem even if they think they can't program.
        • First, let students try to solve their problem with linguistic constructions they learned so far. Perhaps the problem is subtly stated to be hard to solve. Then, teach new constructions, that make problem easier to solve. This way, in my opinion, things are better understood and remembered.
        In order to follow such points, programming language must be very simple. Translating from pseudo-code to a programming language is supposed to be seen as the simplest of the phases. Perl is sintactically too complex. Pascal is a tradition, and is close to what students will learn next years (but, of course, has a lot of limits). As I said, I'd like to use Python.
        I think we actually agree :).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 18:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found