<p>I am learning and working on, golang and python projects. The main problem is while moving between projects (while doing bug fixes), I get confused with the syntax and while implementing changes. I have no problem reading code, but writing fresh code, is where the problem starts. </p>
<p>What is the best way to remember syntax while working or learning multiple programming languages ? Are there any cheat sheet which compares both python{2,3} and golang, which could be potentially useful to people like me.</p>
<p>Sorry, if this has been asked earlier. Any advice would be appreciated. Thanks</p>
<hr/>**评论:**<br/><br/>rvxt: <pre><p>just practice more and make the cheat sheet yourself (only you know what you need on there)</p></pre>thomasfr: <pre><p>I don't think there really is a good answer, persistence in keeping using both languages maybe..</p>
<p>One thing that helped me was when I had learned my fifth or sixth language well (like having years of productive experience with it). By learning very different and similar languages like ML, Lisp, Haskell, C, C++, Python, Go, Java, SQL, JavaScript, even PHP... I have a better toolbox for understanding how to identify language features and understand them better... It's much worse for me trying to remember the standard libraries between languages though :(</p></pre>zenberserk: <pre><p><a href="http://hyperpolyglot.org/" rel="nofollow">Hyperpolyglot</a> can guide you in the right direction.</p>
<p>It provides side-by-side format for many languages, but groups them by family, i.e you do not get a straight python-vs-go cheatsheet.</p></pre>Akkifokkusu: <pre><p>Started looking through the C, Go page. Just from the first few sections, it's missing some Go syntax and makes some misleading statements. The concurrency section is also pretty bare, which is a little odd when it comes to Go.</p>
<p>It's a good idea, but the execution doesn't seem far along enough to recommend it.</p></pre>askbee: <pre><p>I generally refer to separate when sheets.</p>
<p><a href="https://github.com/a8m/go-lang-cheat-sheet" rel="nofollow">https://github.com/a8m/go-lang-cheat-sheet</a>
<a href="http://python-future.org/compatible_idioms.html" rel="nofollow">http://python-future.org/compatible_idioms.html</a></p></pre>michaelbironneau: <pre><p>I know what you mean, we use Go and Python too and it is really hard to context switch between the two at times. Thankfully the context switching is not that frequent in my case and have found that just looking through some source code in the target language (either browsing Github or within the same project) before I start coding warms my brain up with the right syntactic constructs.</p></pre>Fwippy: <pre><p>You could try setting different color schemes in your editor of choice for different languages. Might help to keep them distinct in your mind.</p></pre>thewhitetulip: <pre><p>I once tried to work on Python and Ruby at the same time, it was a long time ago, and it didn't work out well. I'd suggest start from one language. Look at programming as art. When learning a new language as a child, drawing and painting we learned one thing at a time and not everything at once.</p>
<p>Once you learn one language at a time it is simple to remember the syntax</p></pre>kaeshiwaza: <pre><p>I've the same problem when I need to switch on the same day. Also it's difficult to switch from a web framework to an other (pyramid and gin). I miss also some libs like reportlab...</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传