Should one learn C prior to Go?

polaris · · 510 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hey everyone, I have been programming in Java and Javascript and want to move lower level. Should I learn C prior to learning Go?</p> <hr/>**评论:**<br/><br/>ExploreAndTell: <pre><p>Only if you hate yourself or if you have a really good reason to use C (ie. kernel development, hardware manipulation, get that last little bit of performance). :)</p> <p>Also I wouldn&#39;t really consider Go &#34;low level&#34; due to it&#39;s runtime (even if it is compiled into the executable). It does take a little direction from languages like Python that make their APIs line up better with the C APIs (ex. Networking and File manipulation). I would encourage you to learn the language that is right for the job that you&#39;re currently doing, C for stuff really close to hardware, C++ for gaming or libraries that you want good performance and use across languages, Go for infrastructure (especially distributed infrastructure), Python for prototyping and integration of services and systems, Java or C# for enterprise business logic, Ruby, Python or Node for web development.</p></pre>vopi181: <pre><p>No unless you have a reason(speed, interoperability, etc). Although I maintain the stance that for most programmers atleast knowing the basics of C will help you in different places</p></pre>pyThat: <pre><p>Nope</p></pre>fightingpirates: <pre><p>Knowledge about C is certainly not a prerequisite or at all necessary to learning Go. If anything, the opposite is probably more applicable. C is a more complex language than Go, and as such learning Go first would stand you in good stead for learning C. Particularly concepts like pointers, for example. </p> <p>Unless you like diving in at the deep end, of course. Learning C first world indeed make Go seem like a simplistic but powerful language, and you would better understand the reasons why it (and other managed languages like Java and C#) do things the way they do, such as memory management/garbage collection. So it depends on your focus.</p></pre>forfunc: <pre><p>I program for more than a year now in Go and recently started to learn C. You can easily learn go before C, alot of things make more sense to me in C because of my knowledge in Go. So I would say give Go a try</p></pre>atleastfive: <pre><p>One should do whatever one feels like.</p></pre>ar1819: <pre><p>It depends - my general advice would be - familiarize yourself with Go. This will give you basic understanding about pointers, heap and stack, networking and so on. You can then dive even further and explore Go assembly and tricks with unsafe, which you should do only if you absolutely sure.</p> <p>Learning C is good advice for any general software developer if you do not want to treat your hardware as a magic box. It will give you some really good insights about internals, which could be useful for you on your day to day development. But if you are coming from high levels languages it may become really tricky at first, and tooling is... well it&#39;s work in progress. Also prepare to shoot yourself in the foot. A lot. It&#39;s good because you learning but can be/will be frustrating. </p> <p>So - to repeat myself - start with Go. And then, if you really sure about going &#34;low level&#34; or just want to increase your overall competence - learn C. Go will expose you to the many aspects while protecting you from long list of headaches. </p></pre>ar1819: <pre><p>It depends - my general advice would be - familiarize yourself with Go. This will give you basic understanding about pointers, heap and stack, networking and so on. You can then dive even further and explore Go assembly and tricks with unsafe, which you should do only if you absolutely sure. </p> <p>Learning C is good advice for any general software developer if you do not want to treat your hardware as a magic box. It will give you some really good insights about internals, which could be useful for you on your day to day development. But if you are coming from high levels languages it may become really tricky at first, and tooling is... well it&#39;s work in progress. Also prepare to shoot yourself in the foot. A lot. It&#39;s good because you learning but can be/will be frustrating. </p> <p>So - to repeat myself - start with Go. And then, if you really sure about going &#34;low level&#34; or just want to increase your overall competence - learn C. Go will expose you to the many aspects while protecting you from long list of headaches. It is likely you will meet C code in your used libraries (sqlite for example) in form of CGO. You don&#39;t, however need to read it and understand it at this point. </p></pre>drvd: <pre><p>No.</p></pre>0xjnml: <pre><p>Assembler, C, Go.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

510 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传