概述struts_进行概述

概述struts

Google Engineers — Rob Pike, Robert Griesemer and Ken Thompson — began the process of designing a statically typed programming language, in 2007, with the goal of creating a simplistic syntax to securely take advantage of multi-core processors. It was designed as a solution for unnecessary complexities in other languages — C++ and Java — combining favorable features of C, Pascal, Modula and Oberon including aspects of Tony Hoare’s CSP, with the intent of efficient compilation, efficient execution and ease of programming all in one syntax. In mid-2008, Ian Taylor began work on the GNU Compiler Collection front end with major contributions provided by Russ Cox.

摹oogle工程师-罗勃·派克罗伯特·格里瑟默肯·汤普森-开始设计的过程中静态类型的编程语言,在2007年,与创建一个简单的语法来安全地利用的目标,多核心处理器。 它被设计为解决其他语言(C ++和Java)中不必要的复杂性的解决方案,结合了C,Pascal,Modula和Oberon的有利功能,包括Tony Hoare CSP的各个方面,旨在高效地编译,高效执行和简化编程。一种语法。 在2008年中期,Ian TaylorRuss Cox的大力支持下开始了GNU编译器集合前端的工作

O n November 10, 2009 — Google publicly announced its release of the open source project — properly referred to as Go — however the first version becoming available in 2012. The moniker Golang stems from the domain — golang.org — which was selected as a result of go.org not being available. 2016 introduced the Gopher mascot — created by Renée French — along with a model sheet illustrating an accurate representation of unique characteristics. In modern day, Go has a community — in the millions — of programmers — gophers — from all over the world who have contributed to the project which has helped shape the current landscape of the language.

,O n 2009年11月10日-谷歌公开宣布其开源项目释放-适当地称为围棋-但是可用的第一个版本成为2012年的绰号Golang从域茎- golang.org -这被选为go.org的结果不可用。 2016年推出了由RenéeFrench创建的Gopher吉祥物,并附有模型表,可准确展示独特的特征。 在当今时代,Go拥有一个来自世界各地的程序员社区-数以百万计的地鼠-他们为该项目做出了贡献,该项目帮助塑造了该语言的当前格局。

运行 (Run-time)

Go was inspired by the C programming language with an increase in security and the simplicity of dynamically typed languages such as JavaScript or Python. It comes with a run-time library built-in which employs features including — but not limited to — garbage collection, concurrency, and stack management.

Go受到C编程语言的启发,它提高了安全性并简化了动态类型语言(如JavaScript或Python)的使用。 它带有一个内置的运行时库,该库采用的功能包括但不限于垃圾收集并发堆栈管理

Instead of threads — a light weight process attached to an operating system that’s responsible for executing the underlying code of an application — Go utilizes a function or a method known as a goroutine which independently and synchronously executes in relation to other goroutines present in your code — making it easier to use concurrency. Goroutines communicate through channels.

Go使用一种称为goroutine的函数或方法,而不是线程-附加到操作系统的轻量进程来执行应用程序的基础代码。 相对于代码中存在的其他goroutine,它独立且同步地执行-简化了并发性。 Goroutine通过通道进行通信。

Essentially, the functions or methods execute onto a set of threads and when a goroutine is blocked — prevented from executing — the run-time moves its co-routines from the same operating system thread to a distributed thread which expedites blockage.

本质上,这些函数或方法在一组线程上执行,并且当goroutine被阻止(阻止执行)时,运行时会将其协同例程从同一操作系统线程移至分布式线程,从而加快了阻塞。

To prevent the stacks from growing large in size, the run-time library uses an enclosed stack which is resizable by a few kilobytes. It then increases — or decreases — the memory for storing the stack, which allows an overflow of goroutines in a moderate amount of memory, making it possible to construct an abundance of goroutines in the same address space.

为了防止堆栈变大,运行时库使用封闭的堆栈,该堆栈的大小可调整为几千字节。 然后,它增加了(或减少了)用于存储堆栈的内存,这允许在适当数量的内存中溢出goroutine,从而有可能在同一地址空间中构造大量goroutine。

种类 (Types)

In Go, everything is a type. Primitive types include: strings, boolean, integers, bytes, runes, floats and complex numbers. Although it is possible to use types and methods which allow for an object-oriented style of programming, there is no set order, so objects feel more lightweight than other languages.

Go中,一切都是类型。 基本类型包括:字符串,布尔值,整数,字节,符文,浮点数和复数。 尽管可以使用允许采用面向对象编程风格的类型和方法,但是没有设置顺序,因此对象比其他语言更轻量。

Object-oriented programming in Go concentrates on the relationship between types. Instead of declaring which types are related in advance, a type will conciliate an interface according to the subset of its methods, making it possible to appease multiple interfaces.

Go中的面向对象编程专注于类型之间的关系。 一个类型将根据其方法的子集来调和一个接口,而不是预先声明哪些类型是相关的,从而可以安抚多个接口。

Interfaces in Go can be described as a definition which characterizes the type that another type must possess. They allow for polymorphism — a single interface which accepts entities of two separate types. An empty interface does not have methods, allowing every type to satisfy.

介面 Go中的可以描述为定义另一个类型必须拥有的类型的定义。 它们允许多态性-单个接口可以接受两种不同类型的实体。 空接口没有方法,允许每种类型都满足。

Everything in Go is also pass by value, meaning the function will always receive a copy of whatever is passed in as a parameter.

Go中的所有内容也都按值传递,这意味着该函数将始终接收作为参数传递的内容的副本。

错误处理 (Error Handling)

Go is not designed with exceptions built into it. Instead, errors are values which make it possible . In terms of standard error handling, Functions and methods can return multi-values which conveniently outputs an error without overwhelming the value returned. It also comes with functions — such as Defer, Panic, and Recover — to signal and recover from unique conditions which executes as part of a function’s state breaking down an error, resulting in clean error-handling.

Go的设计没有内置异常。 相反,错误是使之成为可能的值。 在标准错误处理方面,函数和方法可以返回多值,从而方便地输出错误而不会压倒返回的值。 它还带有诸如DeferPanicRecover之类的函数,用于发出信号并从独特的条件中恢复,这些条件作为函数状态的一部分执行,以分解错误,从而进行干净的错误处理。

入门 (Getting Started)

Tour of Go

围棋之旅

Effective Go

有效执行

Go Language Specifications

语言规范

Go Docs

前往文件

Go Playground

去操场

翻译自: https://levelup.gitconnected.com/go-an-overview-e20062e6fbe3

概述struts

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值