Hacker News new | ask | show | jobs
by Blackstone4 2916 days ago
C was the first language I learnt when I was at university. Honestly the teacher was bad and I found it difficult. It almost put me off programming.

Fortunately, I later took a mandatory course in Java and Haskell. We learnt both languages in parallel to learn the difference between OO and FP. We were set tasks where we had to write programs in both languages. I loved this course and the lecturers were amazing.

I am against beginners learning C as it's too low level and you can get stuck easily. I would recommend Python as it's widely used for web dev and data analytics. It's linear [edit - correction as I had written "async"] unlike JS which makes what you learn more transferable to other languages.

2 comments

Maybe its just that the Java+Haskell one was simply a good teacher. Imagine you had them switched, so you would've had a bad teacher showing you how to program in Haskell and Java at the same time. Still to this day, your worst nightmares would be slow to load and express in terms of monads.
Agreed. A good teacher is important.

However I still feel like C may not be the best first language as it's low level. This means there's a lot going on and more to learn for the average user so they end up getting stuck more often then if they used a language with memory management. This is based off the premise that the user is of average intelligence and you don't want to to put them off programming.

I agree. In the first few months of my CS degree, first exposition to programming languages ever, and it was Pascal. Then they quickly moved to C, but at least that first impression was done with a leaner language that allowed us to concentrate on what is programming, what are common imperative language constructs, etc. without worrying much about fine details of the machine. I don't think I'd have grasped too well all that new information if I also had to be distracted with understanding all subtle gotchas and details of the C language.
> It's async unlike JS which makes what you learn more transferable to other languages.

Isn’t that backwards or I am missing something?

You're right. I made an edit.