Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

RE: Structured vs. Unstructured Languages

by larsen (Parson)
on Aug 03, 2000 at 16:57 UTC ( #25965=note: print w/replies, xml ) Need Help??


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

I appreciated your post :)
I'm particularly interested in answering (better, just trying to) this question:
Do language affects intellicenge?

I spent some time teaching programming, and I always started saying to the class: "Solve the problem using pseudo-code or other formalism, then write program. Writing the program is merely a linguistic matter."

But I'm not truly convinced :)
From this point of view, Perl is very interesting.

see you
Larsen

If you're interested in languages, natural and artificial, I suggest reading Steven Pinker, "L'istinto del linguaggio". Sorry, I don't know original title: it could be something like "Language Instinct".
  • Comment on RE: Structured vs. Unstructured Languages

Replies are listed 'Best First'.
Are languages just superficial?
by gryng (Hermit) on Aug 09, 2000 at 18:47 UTC
    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

      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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2021-10-25 11:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (89 votes). Check out past polls.

    Notices?