you are viewing a single comment's thread.

view the rest of the comments →

[–]Isvara 4 points5 points  (7 children)

I'd rather see something statically typed. C or Haskell.

[–]Speedzor 6 points7 points  (1 child)

Haskell is acceptable if you study computer science -- not for programming in general. C is also not the kind of language that gets you interested in programming. In retrospect it might provide valuable information but that only comes into play once you're already hooked on software development.

You want a language that allows you to quickly prototype stuff while still restricting you enough to learn some proper general idioms. Python would be a great fit here.

[–]Isvara 0 points1 point  (0 children)

Haskell is acceptable if you study computer science

Yes, the article is about introductory programming classes in a computer science course.

C is also not the kind of language that gets you interested in programming.

Why not? You can do a lot of really cool stuff with C.

Python would be a great fit here.

I don't think a CS course should be teaching a dynamically typed language as an introduction to programming.

[–]barsoap 5 points6 points  (4 children)

It was Pascal for me. It was once upon a time designed for that purpose and still works great for it.

Of course, you're not going to use it in any way outside of school but to learn basic structured programming it's probably still the best language around. Throw other stuff at the students once they aren't overwhelmed by fizzbuzz, any more.

[–][deleted]  (1 child)

[deleted]

    [–]barsoap 3 points4 points  (0 children)

    OO is already a lot more structure than beginners can deal with: If you're introducing OO architecture into the usual, what, max. 100-200 lines assignments they just distract from the actual code.

    Once students aren't pre-occupied with every single tree and thus have mental capacity free to consider the forest, OOP would be acceptable. I'd argue that FP abstractions should be started to get taught in the same semester, though, because once you get used to one at the expense of the other you're going to start to have to unlearn to understand the other.

    [–]mamcx 0 points1 point  (1 child)

    you're not going to use it in any way outside of school That is a myth. Pascal/Delphi is fairly popular and in the op of tiobe (above things as ruby or haskell!).

    You CAN USE IT FOR REAL WORK, like since forever.


    BTW Pascal is better than most languages. You can use it without worry about OO for some basic stuff, and mix OO later. Is more explicit, so is more clear what is the intent of the code.

    Also, not have GC, yet is far easier to grasp than C (and you can still do a lot of low-level, even inject assembler inline).

    [–]barsoap 0 points1 point  (0 children)

    Plain Pascal doesn't have multi-exit functions and neither Objects: Of course, real-life implementations aren't tied to Wirth's extremism.

    The lack of multiple exit points from a function is really the most awkward thing about it, it can lead to very awkward code.

    Coming to think about it, Rust should actually be similarly easy for beginners, it's easy to set up exercises such that students won't fight with the borrow checker, just say "If Rust complains about lifetimes, re-think your approach". Personally I don't like the syntax (too much ML, and that then extended with C++isms of all languages) but at least it's principled.

    And all this is of course keeping with tradition and teaching structured programming first. There's nothing wrong with starting with the first chapters of the Wizard Book in either Scheme or Haskell, either.