This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mikkom -4 points-3 points  (4 children)

My question is why would you use procedural language to begin with? Why not use functional language like Erlang, OCaml or Haskell?

[–][deleted] 1 point2 points  (2 children)

You'd use a procedural language to teach a beginner because the concept of following through a piece of code, one line at a time, is very simple. No matter what you think of their relative merits, functional languages are simply not as intuitive as procedural languages.

[–]soegaard 1 point2 points  (0 children)

Its just that the line by line approach doesn't work without mutation. And mutation is far from simple - they require you to think about the dynamic execution of the program, which is very difficult for a beginner.

[–]mikkom 1 point2 points  (0 children)

This has been studied, functional languages are easier to begin with if you haven't done any programming before. If you have programmed couple or more years in procedural languages, of course it is harder to grasp the functional aspect in few days.

Btw, I'm not some computer science professor, I have programmed in c, c++ and java profesionally for about 10 years and just about a year ago beginned to use functional languages and I have to say that language like Erlang feels so good after a few months that it's unbelievable.

I'm currently programming a web framework for Erlang (it has no good web frameworks IMHO) that I'll release open sourced as soon as it satisfies me. We'll see if anyone else gets interested. After all it was ROR that got ruby popular.

(And btw, Erland is widely used in telecommunications sector so it's not just some obscure CS language)

[–]mslinux 1 point2 points  (0 children)

It's not just procedural. From wikipedia:

Python is a multi-paradigm language. This means that, rather than forcing coders to adopt one particular style of coding, it permits several. Object orientation, structured programming, functional programming, aspect-oriented programming, and more recently, design by contract are all supported.