from Hacker News

Ask HN: Best language to use while learning Computer Science concepts?

by PixelForg on 1/25/23, 10:42 AM with 4 comments

I've been looking at this roadmap for Computer Science

https://roadmap.sh/computer-science

It recommends 7 languages, I've narrowed my choice down to 2 : Python and Rust. With Python it seems like I wouldn't spend much time on the language and can just focus on the concepts pretty soon, but I also have an urge to learn Rust. What would be the better choice?

Background - I'm a Junior frontend web dev with 1.5 years of experience

P.S. - I'd most likely just check out topics I find interesting in this roadmap instead of going cover to cover

  • by raxxorraxor on 1/25/23, 11:40 AM

    If you have an urge, I would definitely say to go for it. For Rust an intuitive understanding of namespaces really helps to understand its paradigms though, maybe that is more difficult for beginners. Maybe it is not and it ia actually more difficult if you aren't used to it.

    Otherwise I would indeed recommend to begin with a high level scripting language. Next to Python JavaScript comes to mind as well. Just because you have parsers for it everywhere. Go is another solid choice in my opinion and I would consider all listed languages as general purpose. I also liked to code in C#, a very good choices as well. I would prefer all these to C and C++.

    Most often formal Comp-Sci does it the other way around. A hello world C program. Fundamentals are important, but so is keeping motivation and seeing fast progress in my opinion.

  • by nhgiang on 1/25/23, 11:06 AM

    What Rust can teach you and Python can't: - Memory management - Some functional, type-driven programming concepts (Python has functional programming facilities but not as many as Rust, although Rust isn't the most advanced functional language out there, either)

    For other concepts, like you said, Python helps you focus on the concepts themselves better

  • by jjgreen on 1/25/23, 12:22 PM

    I'd recommend that you looks at one of the topics, linked lists, using C, just so that you get a feel for explicit pointers. Then do exactly the same using Python (where pretty much everything is an implicit pointer). Then proceed for the rest of the topics with Python.

    C++, Java, too big and objecty; Rust is too hard for a beginner.