TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Learn C or Rust first?

5 点作者 Pharohbot超过 10 年前
I'm 15, I know JavaScript and taking AP Java in school(I really don't like it), and I'm very intrigued by Rust. Should I learn C first though? I don't really want to but some people said I should but some others said it doesn't matter, since you can learn a lot a bit less of what C teaches you(since some Rust libraries hide some complexity, is it really important though?), but its still a lot of information about how memory/computers work, however, I'm more interested in the language than how the computer's internal systems work right now.

4 条评论

angersock超过 10 年前
Learn C first. Learn C first. <i>Learn C first</i>.<p>It&#x27;s a small language, it&#x27;s everywhere, and it&#x27;s going to build character.<p>Rust is still undergoing active development, and solves a different problem space than C by virtue of what it adds. It&#x27;s a good language, mind you, but it doesn&#x27;t expose you to the warts of hardware like C will (by design!). It won&#x27;t let you deal with null or dangling pointers. It will abstract away data types with <i>let</i>. It will treat memory safely (which it really isn&#x27;t). It&#x27;s a great language that will hopefully replace C one day, but that doesn&#x27;t mean you should start there.<p>Learning and debugging C will help you understand how processors work (especially if you start with something simple like an MSP430 devkit). You can look at the code and the generated assembly and see pretty much how the compiler came up with what it did. If you&#x27;re developing on a Unix descendant, you&#x27;ll be dealing with things at a level the operating system intends.<p>You&#x27;ll get to look at a huge corpus of code already out there and see what works and what doesn&#x27;t, and if it strikes you you&#x27;ll be able to modify it (say, making mods for Half-Life or Quake 3 or whatever) and see how things work.<p>Start with C!<p>EDIT:<p>Later, you&#x27;ll see <i>why</i> C needed replacing. You&#x27;ll never appreciate Java fully, for example, without dealing with all the stupid C++ allows.<p>Comedy option--learn Erlang or Elixir--you&#x27;ll be spoiled for the rest of your career once you see how annoying things can be elsewhere.
评论 #8748350 未加载
markuz超过 10 年前
I never wanted to learn the details of how a computer really work as, but I spend a single week learning C, just to learn the basic concepts like pointers. It really helped me understand better other languages. Besides, It would take you many years for you to master it, and the kind of jobs you would get with it would f* damn boring. Don&#x27;t waste more than a week on it :)<p>I&#x27;m learning Rust at the moment, I feel I can express my ideas better with it versus go. But as a hobby. for fun.<p>I&#x27;ve being coding exclusively in JS for 3 years. And just now I feel comfortable with it.<p>There is so much going on with it. I bet you heard about OOP, but what about functional programing. And functional reactive programing ?<p>There are so many libraries and framework in JS. It just crazy. There is angular vs ember. And what about react or famo.us ? And there is nodejs, and things like npm, gulp, browserify.<p>To learn javascript, the language is one thing. But all its tools is another.<p>The reality is this, the more languages you learn, the easier it is to learn a next one. Today I know over 10 languages, but I master only one. And that is what matters, the one you master.<p>But what I things is super important for a programmer this days is a basic knowledge of shell and git. IMO
smt88超过 10 年前
I&#x27;d suggest Go over Rust for a beginner. Go would allow you to do pretty much any kind of project you wanted (web API, mobile app, CLI tool), which is what&#x27;s important for learning: having little hobby projects that you do on your own.<p>By learning Java, you&#x27;re already getting some good CS fundamentals. It probably wouldn&#x27;t help you that much to learn C on top of that.<p>I&#x27;ll leave you with this: if you want to make programming into a career, you don&#x27;t need to learn C. If you want to study programming as a researcher or teach it, you should learn C.<p>Being 15, you don&#x27;t know what you want to do though, so I&#x27;d suggest just doing what you find fun for now and worry about the rest of it later.
评论 #8747505 未加载
评论 #8747433 未加载
ripitrust超过 10 年前
Maybe you could briefly go through K&amp;R, it is both readable and challenging. Then start Rust
评论 #8748286 未加载