I am currently finishing up my B.S. in Computer Science at a local private University. When I started a couple of years ago, C++ was taught in the intro to programming course for freshmen. About two years later, Java was taught as a first language. (I disagree with that because I think that OOP should be eased into over the duration of a semester, and it shouldn't be something forced upon non-programmers their first day.)

Regardless, there is now a discussion / debate going on within my school's CS department to teach python as a first language. I was just wondering what everyone thinks of this. Good? Bad?

11 Years
Discussion Span
Last Post by vegaseat

I am learing python as my first language. I really enjoy it, it has kept my attention. I suppose I like the ease of it(I am not sure i have a programmers mind). For an introductory course, it seems perfect. It will teach you all of the basics of programming, including indenting(its forced). I wish the community college in my town would offer it, I would take it just for fun.


But with python, you don't have to declare your variables. Is it such a good idea to get into the habit of not having to do that? In addition, python offers some features that, while nifty, are pretty unique and not so sure they are applicable as a first language introduction to computer science.


I am not much of a programmer, so I don't probably have a great perspective, but I have an opinion :-) Python is not teaching bad habits, it seems to just be teaching on a higher level(language wise). It may be hideing some stuff that you will need to learn with a lower-level language(c or c++), but maybe that is a good thing. Without having to worry about declaring variables and memory managment(and other stuff I know nothing about), it lets you learn the basics about programming without being overwelmed. With the basic skills that the person learned using python, c or c++ will not seem so tough.


Being able to program without being able to handle memory management is just fine. But keep in mind, that computer science majors will need to learn all of that stuff for all of their other courses! Additionally ... C#, Java, and all OOP languages (as far as I know) require you to declare variables. Not doing so is just a bad habit IMO.


what are some of the arguments for using python that have been discussed at your university(just curious)


Being able to program without being able to handle memory management is just fine.

shows you how little I know about programming, I thought that(memory allocation) was nessesary for just about anything with C .

I guess you do not have to allocate memory to program "hello world" :-)


Well, I think that it's good to learn Python as a second language (after C or better C++) because in many introductionary texts I found there are a lot of comparisions with C and C++. If you're a beginer, then, these infos means nothing to you, and if you have some experience with C and C++ you'll learn new languages such as Python a lot more faster.

- Micko


When I first learned Python, I was very familiar with STL in C++ and easily recognized many of Python's containers. Now there was an understandable way to work with STL.

Actually Python reminded me of the transition I made from Pascal to C in my early school days. The computer departments then were worried about C's free wheeling style.

I don't think Python teaches you bad habits. Your different data types are still there, you just won't have to endlessly declare them. Variable names become more important now, to keep track of data types. Using recognizable variable names is something one ought to do anyway!

The indentations you did to make your code more readable, are now your statement blocks. All in all, you are gently pushed in the direction of code readability!

In Python everything is an object, you don't have to take that execrated bath in OOP, you are already in the tub!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.