is Go good choice as first programming language?

blov · · 195 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<hr/>**评论:**<br/><br/>sh41: <pre><p>I personally think it&#39;s one of the best programming languages to start with. I wish I could&#39;ve started with it first. The only thing it won&#39;t teach you is frustration of using other less pleasant languages, so you might not have enough context to appreciate some of the limitations and trade-offs that Go makes.</p> <p>See <a href="">this talk</a> from GopherCon 2015 about the experience of picking Go over other languages as the first one to learn, and how that went.</p></pre>jerf: <pre><p>Yes. It&#39;s one of the simplest languages around that you can do professional work in. Possibly the simplest. 10 years ago I&#39;d recommend Python, but that has actually become fairly complicated. Plus Python did perhaps too much shielding your from the underlying realities of computation; with Go you&#39;re not quite so far away, while still being relatively easy to use.</p></pre>arp242: <pre><p>One of the problems with Go is that a lot of the documentation and &#34;getting started&#34; material assumes prior programming experience. The Python materials are a lot better in that respect.</p></pre>kezc: <pre><p>what if i know some java? i made few simple android apps. </p></pre>natefinch: <pre><p>if you know some java, go will be easy.</p></pre>semisync: <pre><p>a coworker of mine learned Java first, Go is his second language. you should be fine.</p></pre>ThatMightBePaul: <pre><p>100% agree, and I think this is something that we as a community can improve on.</p></pre>recurrency: <pre><p>The Python docs are so badly structured imo. Very few relevant examples. Funcs and methods are poorly named and hugely inconsistent godoc is just... amazing. gos naming is just so well thought through. Plus the fact that you can actually read the stdlibs source code... </p></pre>dimitrios_gopher: <pre><p>This it is easily solvable, and this is just the type of contributions the community is looking for! You should consider contributing a &#34;beginners guide to Go&#34;! I&#39;d help</p></pre>arp242: <pre><p>Yeah, that sounds awesome, but I&#39;m afraid I don&#39;t really have the time or skills to do that well.</p></pre>kalekold: <pre><p>Yeah, what happened to Python. Man, it got complicated!</p></pre>mcandre: <pre><p>Is blah a good choice of first programming language? My answer is always yes. Sure, some are easier to learn than others, or encourage good habits, or establish fundamentals. I really don’t care which one you learn first, just have fun!</p></pre>earthboundkid: <pre><p>For real. You know what you call someone who knows one programming language? A bad programmer. </p> <p>You cannot be a professional programmer without at least being interested in multiple languages. It absolutely does not matter what your first language is. Mine was BASIC. I kept learning!</p></pre>raff99: <pre><p>In my opinion yes, unless you want to start with something with a REPL (but even with Python/Ruby, how much can you learn with one liner ?)</p></pre>robmuh: <pre><p>Personally I think it is the best second language, Python and JavaScript are great first languages. In fact, we require proficiency with Python (sync) <em>and</em> JavaScript (async) before offering Go. I make sure people learn Go because it forces looking at complex code management in a better way, favoring composition over inheritance for example. It is also the best first concurrent language anyone can learn for the simplicity of goroutines. <a href="" rel="nofollow"></a></p></pre>natefinch: <pre><p>I think go is better than python for two reasons: types and the compiler. Python might be nice for a super introductory course in &#34;this is a loop, this is an int, this is a string&#34;.... but as soon as you want to build anything more than hello world, you run into attribute errors etc.</p> <p>Go also lets you transition easily into learning about memory and pointers, whereas that&#39;s basically impossible with python, so now you have to go switch to a different language and learn that one.</p></pre>tty5: <pre><p>I think Python is the better choice here for the very same reasons: when you are first trying to grasp basic ideas of programming you don&#39;t need to think about types, compilation and pointers.</p> <p>Python also gives you REPL.</p> <p>Source: 3+ years of working full time as Python-only dev, 3 years of working full time as Go-only dev. + I have helped people start programming.</p></pre>natefinch: <pre><p>The thing is, you <em>do</em> need to think about types. Python <em>has</em> types, it just hides them from you, case in point:</p> <pre><code>&gt;&gt;&gt; &#34;2&#34; + 2 Traceback (most recent call last): File &#34;&lt;stdin&gt;&#34;, line 1, in &lt;module&gt; TypeError: must be str, not int </code></pre> <p>You can use <code>go run</code> if you don&#39;t want to compile.</p> <p>I find the playground to be much more useful than a repl. Who writes code one line at a time? That&#39;s not how real code works. </p> <p>And if you really want, there are unofficial go repls.</p> <p>Yes, python is probably better for the first week, but for the second week? I&#39;d go with Go every time.</p> <p>Granted, I have not helped people learn to code, though I think it would be fun.</p></pre>Redundancy_: <pre><p>Javascript can leave you with some callback habits, and it has some really jinky syntax leftovers. I&#39;d personally sidestep that and suggest Dart, Go or C# for async.</p></pre>boompleetz: <pre><p>Yeah JS has too many warts that ES6 is covering up. It has a different paradigm of functions as first class objects that you are supposed to pass around. I would consider it more of an in-demand quirky language than something to learn with.</p></pre>pinpinbo: <pre><p>Heck yeah!</p> <ul> <li><p>Simple grammar.</p></li> <li><p>Teaches you type-safety, but not super draconian about it.</p></li> <li><p>Bunch of libraries to be able to build something useful.</p></li> <li><p>Runs hella fast, no need to rewrite it later because of performance.</p></li> <li><p>Easy to share because of single binary executable.</p></li> </ul></pre>vem_: <pre><blockquote> <p>Teaches you type-safety, but not super draconian about it.</p> </blockquote> <p>Advanced type systems aren&#39;t really draconian.</p> <blockquote> <p>Runs hella fast, no need to rewrite it later because of performance.</p> </blockquote> <p>More dependent on algorithms than language.</p> <blockquote> <p>Easy to share because of single binary executable.</p> </blockquote> <p>Go did not invent static compilation.</p></pre>tylermumford: <pre><blockquote> <blockquote> <p>Easy to share because of single binary executable.</p> </blockquote> <p>Go did not invent static compilation.</p> </blockquote> <p>It&#39;s still one of Go&#39;s strengths, regardless of who did it first. What&#39;s your point?</p></pre>vem_: <pre><p>Generating static binaries is not hard in any language I&#39;ve used.</p></pre>ants_a: <pre><blockquote> <p>Advanced type systems aren&#39;t really draconian.</p> </blockquote> <p>But they do include significantly more concepts. Go&#39;s type system has a really good balance of parsimony of concepts while having enough to provide guard rails to catch the stumbles of a beginning programmer.</p></pre>vem_: <pre><p>I suppose. To me the advantage in using Go as a a beginner is that the ergonomics are such that you don&#39;t worry about stuff like learning the command line. The advanced type safety stuff is pretty much useful immediately, provided you want to write software, not just learn some programming.</p></pre>carleeto: <pre><p>Depends on what you want out of it.</p> <p>If you just want to get stuff done quick, you might find the learning curve a little steep.</p> <p>If you want to learn how to do things right, it&#39;s an amazing language to get started in. This is because it has been designed with software engineering in mind and teaches you things like keeping your interfaces small, keeping your style consistent, to always think about errors, etc.</p></pre>everdev: <pre><p>Depends on what you&#39;re looking for:</p> <p><strong>Easiest</strong> - No. Byte slices, pointers, channels, concurrency, etc. are probably going to be more challenging to grasp without prior experience. Ruby or other dynamic / scripting languages feel more newb friendly in that you can do some really simple programming really quickly.</p> <p><strong>Quality</strong> - Yes. In my opinion, it&#39;s so easy to write and find bad code in Ruby, JS, etc. The languages are so flexible you can do some non-idiomatic things really easily. With Go, the tooling and compiler will help you and the community and are great resources.</p> <p>If you pick Go, stick with it. I almost gave up a couple times, but mostly because of bad habits from other languages. Go will usually force you towards the right solution which can be frustrating if you&#39;re still learning what the right solution is. Once you get it though, it&#39;s a dream to work with and will make you a far better programmer than if you jump into another language first in my opinion.</p></pre>nomadProgrammer: <pre><p>Go or Javascript. Also Python.</p></pre>minond: <pre><p>It depends on what your interests are. At the end of the day you’re going to have to do a lot of programming to become even just a decent programmer, let alone good. But don’t let this discourage you, as we’re all in the same boat. If Go gives you an environment where you can stay interested in working on projects, then it’s good. When it comes to server side, concurrent systems programming, Go excels — if this is an area that interests you, I encourage you to learn the language. And the fact that it’s a statically typed, modern language with good tooling make it a good starting point.</p> <p>If you do go with Go just get ready to get a little spoiled. I personally haven’t found many languages that have their act together as well as Go does. </p></pre>brianvoe: <pre><p>YES!!!</p></pre>MARTEX8000: <pre><p>I think we often forget that &#34;first language&#34; and first immersion into computer science are not parallel they are often concurrent (pun implied)...I started with Go, but had to back up a bit and learn some Bash and of course Github and even some basic C in order to get a grasp on the basic &#34;assumed&#34; terminology...even at Go 101 there are a lot of assumptions about navigating the terminal and simple writing techniques in basic level code that a true novice-uninitiated-learner is going to struggle with. If there were a &#34;Go for kids&#34; I would have started there, but so far there is not (and there REALLY should be if we want our future generations to be fluent in anything except human)... I can remember being confused for the first few weeks about Golang being a &#34;statically typed&#34; language and thinking, &#34;Well they all are typed on a keyboard aren&#39;t they?...the syntax of code itself should have a decent primer somewhere, but fortunately there are a ton of resources and the code <em>wants</em> to be discovered.</p></pre>__crackers__: <pre><p>No, it isn’t.</p> <p>The language itself would be a good choice, but the docs and broader community tend to assume you already know how to program. Tutorials are generally of a “here’s the Go way of doing that thing you already know all about” nature.</p> <p>Python would be a better choice, as there’s so much material aimed at people learning to program or non-programmers.</p> <p>It’s a more complicated language than Go, but you can ignore a lot of that, and Python is higher-level, so there’s less boilerplate and more “doing”.</p></pre>

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

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