48 ms·
I always feel like people who suggest python over c as the de-facto thing to start with, are probably people who started with something like c over something li
by tpoacher 6y ago
I always feel like people who suggest python over c as the de-facto thing to start with, are probably people who started with something like c over something like python themselves, but forget all about how all that experience and understanding helped them make sense of python in an instant, and thus consider the 'easy' language a no-brainer.
To an absolute beginner, however, python is not only an incredibly complex system (except for extremely trivial things), but because it goes out of its way to hide its internals, it cripples users for years before they can figure out what's actually going on under the hood.
I'm fully on the "start with c, move to python" camp. The lessons just need to not suck, which I concede may be easier to do with c ... but it should still be c.
- chii 6y ago> it cripples users for years before they can figure out what's actually going on under the hood. it doesn't - python hides the unimportant aspect of the computer; namely, it abstracts the memory allocation and resource process. You treat the computer, under python, as an abstract machine which has unlimited memory, and don't worry about its use. you focus on algorithmic understanding and fundamental data structures. Once you grasped the computer science fundamentals, then you tear open the box and learn the underlying impl. of a computer - such as memory allocation, and assembly, etc (ostensibly, by making your own operating system using C, and/or writing a compiler using C). you can replace python with haskell, which imho, does an even better job as a first language.
- Koshkin 6y ago> haskell Sure, sure - monads and all... I wonder if there is even a beginner programmer’s learning material that uses Haskell.
- jeffe 6y agoTo be fair, python has many robust features beyond gc. For example, dicts, which are bread and butter for python abstract away 1000s of lines of C, which leads to very confused students when they first see errors like 'unhashable type: list'. Encountering leaky abstractions always made me uncomfortable when I took my first classes, but for a very first class its still probably better than dealing with memory allocation in C depending on what one expects from an intro class.
- chii 6y agoBut when you start using dicts at the beginning, you would be learning about hash maps and what hashing is, etc. This is basically computer science 101 stuff, with which python makes an environment much easier to learn with.
- detaro 6y agoI have TA'd both intro courses using C and Python as the first language. Python is IMHO better as the first language.
- tpoacher 6y agoI respect that. I have similar experience but with the reverse conclusion.