Go World News of the Week

01

Why use interface{} with caution in Go

I remember when I first switched from Java to Go, a senior who used Go language told me: "Use interface{} sparingly, it's very useful, but it's better not to use it." At that time, my team leader jokingly replied, : "No, he came from Java, and he wants to define a class when he encounters a problem." At that time, my first impression of interface{} was that it was analogous to the Object class in Java. We will definitely not go everywhere when we use Java. Pass Object. Later facts proved that young people are young people after all. Looking at the interface{} flying in the current project, they sometimes become function parameters, which makes people puzzled; sometimes they are hidden in the structure fields and change endlessly. I can't help but think of a sentence I saw before: "Dynamic language is cool for a while, refactoring code crematorium." Therefore, I wrote this experience summary about interface{} for future reference to myself and readers.


From GoCN Daily News (2018-04-15)

Original link: https://juejin.im/post/5ad1c766518825555e5e4646

02

Java to Go Study Guide

This guide is designed to help Java programmers quickly and deeply understand Go language features!

Object Oriented Programming (OOP) in Go is very concise and elegant. Said it is concise, the concise point is that it does not have many concepts in OOP, such as: inheritance, virtual functions, constructors and destructors, hidden this pointer and so on. It's elegant because its object orientation (OOP) is a natural part of the language's type system. The entire type system is wired together through interfaces.


From GoCN Daily News (2018-04-16)

Original link: https://gocn.io/question/1801

03

Programming a blockchain P2P network in Go

In a true P2P architecture, there is no need for a centralized service to maintain the state of the blockchain. For example, when you send bitcoin to a friend, the "state" of the bitcoin blockchain should be updated so that your friend's balance increases and yours decreases.
This article will continue the previous work, 200 lines of Go code to implement the blockchain, and join the P2P network architecture. Before continuing, it is strongly recommended that you read this article, it will help you understand the code that follows.

 

From GoCN Daily News (2018-04-16)

Original link: https://mp.weixin.qq.com/s/2daFH9Ej5fVlWmpsN5HZzw

04

Learning Go from Test Driven

The author introduces some experiences to the development team, and tries different methods, how to make a team from some people who are curious about Go to become efficient Go system developers.


From GoCN Daily News (2018-04-16)

Original link: https://gocn.io/question/1806

05

Go interactive programming with jupyter notebook

The programming language Go (golang) has grown in popularity over the past few years, I'm a big fan of Python, and three years ago I mainly used Python for my hobby projects. Now, I use Go instead of Python because I can use Go from small hobby projects to large projects for large companies.

   

From GoCN Daily News (2018-04-17)

Original link: https://medium.com/@yunabe/interactive-go-programming-with-jupyter-93fbf089aff1


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324770043&siteId=291194637