is Go a good language for complete newbs?

blov · · 649 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>i&#39;m a newb. i don&#39;t know how to program. is Go too complicated? should i learn python or go?</p> <hr/>**评论:**<br/><br/>Zikes: <pre><p>You&#39;re worried about backing the wrong horse, that the language you choose will wind up irrelevant, useless, or otherwise unsuitable for your needs, but don&#39;t worry. Learning to code is really all about common concepts. Once you understand those concepts switching languages is incredibly easy by comparison.</p> <p>As a big fan of Go, I have to say that Python is your best bet for starting out. Go is a <strong>very</strong> easy language to learn once you know how to code in general, but starting from scratch means you need all the resources you can get. As a popular language that&#39;s been around for much longer, Python has the necessary tutorials and communities to help you get up and running quickly.</p></pre>Finnegan482: <pre><p>I&#39;d agree with everything you said.</p> <p>Also, the switch from Python -&gt; Go is really easy. Once you know Python, adding Go to your toolbox doesn&#39;t take much time.</p></pre>dlsspy: <pre><p>You should learn to program. The language is not your biggest hurdle.</p></pre>kirakun: <pre><p>Nevertheless, you need to pick a language to start learning programming. And the choice of language can either facilitate (say, Python) or hinder (say, C++) progress.</p></pre>devsquid: <pre><p>So very much this!</p></pre>drink_with_me_to_day: <pre><p>Yes! Learning a language (as opposed to learning programming) will only make you dependable on it&#39;s gimmicks to design your code.</p></pre>jahayhurst: <pre><p>No matter what language you pick, you&#39;re going to want to dive in and really try to see it from the inside out.</p> <p>Go is not a <em>bad</em> choice. It&#39;s a great 2nd or 3rd choice. But, to really appreciate Go, I think you need bad habits (from other languages) to unlearn. Very ready to be wrong on that point though.</p> <p>Try Python? It&#39;s got a great community, and a lot of libraries to work with.</p> <p>Javascript is very accessible and right in your browser - it&#39;s a nice language to start with.</p> <p>C++ or even C# are nice languages. Yeah, sure, there&#39;s a lot of boilerplate, but a good IDE can help you dig through that - I don&#39;t like the junk on C#, and the bad habits Visual Studio teaches you, but <em>it is really easy to use</em>.</p></pre>SportingSnow21: <pre><p>I would suggest learning a compiled, strongly typed language first. It&#39;s a bit more overhead to understand the types, but the compiler will make it easier to debug than digesting python stack traces. </p> <p>Go and C are solid candidates, with C++98 and Java rounding out the set. Java and C++ require more boilerplate, which isn&#39;t conducive to all learning styles. If you&#39;re okay with the boilerplate for toy programs, the IDE tooling makes Java and C++ good places to start. If minimization of and understanding of the code is important, C and Go are definitely better options. </p> <p>If you do choose to start with Go, I suggest you avoid concurrency for some time. It&#39;s touted as a major strength, but it&#39;s not very inviting for new programmers. Debugging deadlocks and go-style fork bombs isn&#39;t quick, easy, or suggested for the sane. </p> <p>Once you have a solid understanding of types and control flow from typed languages, Python gives you a good platform for understanding the object-oriented inheritance that is ubiquitous in many languages. While I prefer the Interface composition of Go, most of the general programming community lives and dies on inheritance. Python is not a bad way to dig into understanding that flavor of object-oriented programming. Avoiding inheritance simply leaves you on too small of an island to really get involved in the programming community.</p> <p>EDIT: If you&#39;re in the academic community, get to know the scipy stack (numpy/scipy/pandas) as soon as you&#39;re comfortable with types and control flow. The scipy stack is currently top of the heap for crunching data, with a fistful of libraries building on top of it. Machine learning, neural networks, and the family of statistical libraries are much better developed than most.</p></pre>bkeroack: <pre><p>There are some problems with statically typed languages for complete beginners:</p> <ul> <li>The compiler errors will probably be unhelpful, if not totally inscrutable.</li> <li>Unless you&#39;ve been programming for a while (particularly with large/complex codebases) the benefits of static typing are not obvious. To most beginners it just seems like needless pedantry and annoyance.</li> <li>For C specifically, there is <em>so much</em> low level scaffolding you have to implement to do anything that most people would consider interesting. The consequences of even a minor mistake is typically &#34;Segmentation fault (core dumped)&#34; which gives hardly a clue as to what went wrong or where the error is.</li> </ul> <p>I think the number one most important thing for beginners is to find an interesting project/problem and then make meaningful progress towards solving or implementing it. If the experience is too frustrating the tendency will be for the learner to get stuck and give up.</p> <p>Python is a nice choice because it avoids most of the above issues (not all of them--exception messages can still be really mysterious to beginners) and has a huge number of possible applications: games, scientific analysis, system utilities, etc.</p></pre>SportingSnow21: <pre><ul> <li>While compiler errors don&#39;t always give the solution, the line numbers are usually enough to point to the problem in toy/small programs. Beginners avoid most of the really crazy messages by simply avoiding the preprocessor (mainly macros).</li> <li>My recommendation of starting with static typing isn&#39;t about the comparison of static to dynamic. That&#39;s a much deeper discussion for seasoned programmers. Instead, it&#39;s about understanding the underlying allocation, which is not easy to learn in dynamic languages because it&#39;s hidden in the runtime. I&#39;ve found it easier to teach someone how to be really pedantic, then tell them which rules can be ignored where. Adding exceptions is easier than adding rules in and out of programming(completely my opinion and experience, I have no studies or evidence to lean on here).<br/></li> </ul> <p>A lot of this really depends on the person, though. Some enjoy learning by making a million toy programs, while others prefer projects. That should definitely influence the choice of language, as I would never suggest a complete beginner dive into a project with C. </p> <p>I don&#39;t think python is a bad choice, but the Python 2/3 issue is now big enough to become a tripping point. Not only does the language hide a lot of the work, but searching for documentation has become a minefield.</p></pre>touristtam: <pre><p>Another vote for Python over Go as first language. Much easier to learn and lots of potential project to dive into and learn from.</p></pre>intermernet: <pre><p>As others have mentioned here, The key is to learn to program. The arguments for and against any particular language entail bringing a can-opener to a worm cannery.</p> <p>Go is a wonderful language, but unfortunately it&#39;s very opinionated. I agree with most of it&#39;s opinions, but these don&#39;t really matter until you get to the nitty-gritty of Object Orientation (how do we structure the program), generics (to do with the type system, another area of debate...), etc.</p> <p>I&#39;d recommend starting with something like Python (scripted, but beautifully formed) or C# (Available on most platforms despite being a Microsoft language).</p> <p>Once you have your brain working with the general (language agnostic) concepts of conditional branching and looping, you can start to appreciate the subtleties of &#34;composition&#34;. This is where &#34;Object Oriented&#34; ideas come into play, and are where the dragons lurk.</p> <p>Go comes from the idea that &#34;Interfaces&#34; can be used to express most relationships between objects. An interface is, simply, just &#34;what something can do&#34;. Many languages support this concept, but Go is quite opinionated in this regard, in that interfaces are implicitly fulfilled (If something <em>can</em> satisfy the interface, it automatically does, rather than explicitly saying that it does.).</p> <p>Most other Object Oriented languages rely more on a class hierarchy. The composition relies more on extending base classes to enable functionality, and interfaces are more explicitly defined.</p> <p>Don&#39;t worry if this is confusing, it will become more obvious as you learn other languages. Also, Interfaces are not the &#34;be all and end all&#34; of OO programming. Do a Google search to find out more about inheritance, abstraction, encapsulation, isolation and all of the other goodies that OO (loosely defined) entails.</p> <p>The point is: Most languages out there do things the more traditional ways that Python, Java, C++, C# etc do them. Go is slightly different in this regard. You are better off, as a new-comer, to learn the more common idioms before looking at Go.</p> <p>As others have said: Start with Python, then look at Go when you find you need a compiled language :-)</p> <p>You&#39;ll appreciate the difference much more if you do.</p></pre>Raton123456: <pre><p>Lear Python. It has MUCH more in the way of tutorials, examples and resources. Later on learn go.</p></pre>scharty: <pre><p>Learn python first or learn go first. They&#39;re both good. Also Ruby. Python is easier to get going with for the uninitiated. And php has the most jobs but they don&#39;t pay as well.</p></pre>koalefant: <pre><p>I remember a book called something like meta programming for ruby and it was hardcore, even for someone like myself who has bee programming for a while. Ruby is a nice language but it has a depth that I think surpasses Go (which doesn&#39;t necessarily imply a commensurate increase in functionality).</p> <p>I actually think C is a good language to start from. You&#39;ll probably never touch it again but the principles of it are very useful to be aware of.</p> <p>Honestly though as long as you maintain a dedicated approach to learning I don&#39;t think it really matters what language you start off on.</p></pre>devsquid: <pre><p>It depends on the type of person you are. Are you teaching yourself? Then absolutely not. Learn Python first. Its awesome, its super simple and forgiving. You can do some incredible stuff really easily. In a lot of ways Go is like a bit more complex Python.</p> <p>Python will teach you the basics of programming, while still keeping you entertained and avoid a lot of head aches of a more advance language like Go.</p> <p>Also good/best advice for getting starting is to find a problem and try to solve it. Give yourself a project. Write a CLI Calculator. That helped me get started.</p></pre>docoptix: <pre><p>I think you did not really give enough info about where you want to go, but my two cents:</p> <ul> <li>You cannot just learn to program. After 8 years of being a full time dev, I still learn new stuff basically every day. You will just improve</li> <li>day to day dev tools are much more complex than languages itself. Given that a lot of tutorial stuff nowadays points to Github, I suggest you get used to git first. Git is not a programming language, but if you try to understand it, you will be confronted with some CS concepts and Git is also useful outside of programming stuff</li> <li>in case you are using Windows, I suggest you use a *nix environment for developing. Ubuntu is a good dev environment IMHO.</li> <li>you can try simple tutorials which run in the browser and see which language you like most: eg. <a href="https://tour.golang.org" rel="nofollow">https://tour.golang.org</a> <a href="http://tryruby.org" rel="nofollow">http://tryruby.org</a> <a href="http://www.tryerlang.org/" rel="nofollow">http://www.tryerlang.org/</a> <a href="https://tryhaskell.org/" rel="nofollow">https://tryhaskell.org/</a></li> </ul></pre>ptman: <pre><p>I recall reading about someone who taught Go to a class in primary school. It went better than expected. He had previously used Python in a similar setting. Especially gofmt was a good thing. And the language is simpler than Python. The conclusion was that he was going to use Go in the future as well.</p></pre>lunchboxg4: <pre><p>I&#39;m going to say basically the same thing as everyone else here, but I&#39;ll attempt to say it differently - instead of finding a language to code in (Go, Python, C), find a mentor and learn what they do. You&#39;re learning both to code and a coding language at the same time, and it will be hard to differentiate which is which. Find someone you can learn from, learn the concepts from them in what they do, then go learn whatever languages you want. If it&#39;s a Go mentor, great. Check out Meetup for local user groups. </p></pre>albatr0s: <pre><p>Yes, it is. No, it&#39;s not too complicated. You should learn both.</p></pre>QThellimist: <pre><p>If your learning to programing start with python. It&#39;s more simple with more tutorials.</p></pre>npyde: <pre><p>If you are in academics, learn Python first if it is commonly used in your field.</p> <p>Personally, I prefer Go. In my opinion, it is going to be the language of the future. They really put thought into it.</p></pre>dilap: <pre><p>it&#39;s going to depend a lot on your style of learning. something like python is easier to get stuff done in fast, but it&#39;s a more complex language, and it has a harder-to-understand model of computation.</p> <p>just go with whatever seems interesting, and don&#39;t be afraid to switch if you get bored or more interested in something else.</p> <p>learning any language puts you 98% of the way to learning a different language.</p></pre>adrianojn: <pre><p>I recommend you this book: <a href="https://www.golang-book.com/books/intro" rel="nofollow">An Introduction to Programming in Go</a> - <a href="https://www.golang-book.com/public/pdf/gobook.0.pdf" rel="nofollow"><strong>PDF</strong></a></p></pre>tu_1t_le: <pre><p>hmm, good question. Is C a good language for noobs ? I&#39;d say yes if you are interested in some specific abstraction level and want to learn general programming. Obviously Go is safe memory wise , my point is, it is good if you want to learn programming in general, it might not be good if you want to learn how to create websites or game development because you&#39;ll spend a lot of time on low level stuff.</p></pre>barbaroskurt: <pre><p>learn a full oop (object oriented programming) language (ruby, c#, java). after you can learn golang. so you will be able to see difference. (how golang approaches programming etc).</p> <p>imho if you want to work as a developer, first you should check career websites and search &#39;what companies looking for&#39; in your country. i mean, in every country there are trending programming languages. so you should learn them first so you can able to jump a job quickly :) otherwise want to continue as a hobbyist go with whatever you want.</p> <p>and don&#39;t forget to learn a programming language every year &#39;-&#39;</p></pre>aboukirev: <pre><p>If I were to teach programming, I&#39;d start with something very simple like FORTRAN or BASIC. Then move to a strictly procedural language like C or Pascal. And only later introduce object-oriented, object-based, functional, and relational concepts.</p> <p>Starting with Go or Python is a big jump and can be overwhelming if you don&#39;t have more basic concepts down first.</p> <p>Between Python and Go it&#39;s hard to tell which one is better to start with. Python has a great REPL (read-eval-print loop) out of the box. But Go playground is not bad either for experiments. So pick either one and stick to it.</p></pre>sehyui: <pre><p>Personally I learnt mostly c++ from the beginning. It&#39;s a bit hard with the memory allocations and pointers but when you learn to handle it then most other languages are easy.</p> <p>The learning curve for me: first really fun with basic tasks. Then quite hard and confusing when you realise that you don&#39;t really know anything. Then hard and fun going into patterns or best practices and code design choices. After that it&#39;s fun. And the you switch to a language with garbage collection and you&#39;ll be quite impressed with how easy everything is.</p> <p>And then you&#39;ll continue to learn for the rest of your programming career ;-)</p></pre>Xonzo: <pre><p>I started in BASIC on the VIC20 ... Hell ya. I don&#39;t see any issues starting with Go. </p></pre>bmo111: <pre><p>Python or Ruby</p></pre>p7r: <pre><p>Learn programming concepts, not programming languages. Ruby is good at letting you do OO, functional and imperative all out of the box, all without caring about data types which can speed up dev time for newbs (but make things harder longer term). Python is OK as well, but it doesn&#39;t tick boxes for me as much as Ruby does.</p> <p>Then, take the concepts you learned and come and learn Go. See what you like/don&#39;t like. Perhaps try other languages: learn at least one Lisp; learn Javascript; learn PHP and feel sick; learn Java; learn Smalltalk; commit to learning one new language every year from now on.</p> <p>Then, use the right tool for the problem you&#39;re trying to solve. Use message brokers to provide interfaces between components written in different languages. You&#39;re now miles ahead of most of your peers.</p></pre>SupersonicSpitfire: <pre><p>Pick any language, but don&#39;t get stuck. Search Stackoverflow then ask your own question. Write a list of questions and showstoppers you wish to examine further. Stick to the mission.</p></pre>dasacc22: <pre><p>The first steps to learning probably shouldn&#39;t be &#34;which language should I use?&#34;. The hardest part is going to be picking a project to work on that you want to work on. What you pick is going to dictate where you should start looking library-wise, and thus language-wise.</p> <p>Along the way, you may realize your project could be so much better b/c things that seemed impossible are actually trivial, you&#39;ll want to rewrite it, or you&#39;ll come up with a brand new project using new ideas. You may realize some library that you thought was helping you is really just getting in your way. Take a quick survey again of languages, of what you want to achieve with this new project.</p> <p>Finish a project, and you&#39;ll have learned to program, and likely will have played with a few languages along the way.</p> <p>Then you&#39;ll need a new project, because this rabbit hole runs deep ...</p> <p>Your greatest challenge won&#39;t be what language, you&#39;ll gravitate to what works for you if you&#39;re persistent. The greatest challenge will be, what the hell are you going to work on?!</p> <p>Or just read enough of some web language to get a job making minimum wage at some place with no medical benefits but hey, they have a kegerator on-site, and they&#39;ll give you stuff to work on.</p></pre>kpmy: <pre><p>Well, if you don&#39;t know CS at all, and the point is to understand something, you need to learn basics. You should try Oberon, it keeps concept clear, Oxford teaches students with Oberon and Haskell, you should try both.</p> <p>And what about golang? Golang is almost Oberon, with C-syntax, parallelism features and syntax sugar for &#34;populi&#34;. If you learn Oberon, you will get understanding of golang in a week.</p></pre>hdczsf: <pre><p>yes.go is not a good language,but go is a good language for complete newbs.</p></pre>

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

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